自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (6)
  • 收藏
  • 关注

翻译 单例设计模式

#ifndef TESTMODEL_HPP#define TESTMODEL_HPPclass Singleton{public: ~Singleton() { //std::cout << "destructor called!" << std::endl; } Singleton(const Singleton&) = delete; Singleton& operator=(const Singleton&...

2021-04-08 00:31:22 66

原创 C++ 获取图片的大小

#pragma once#include <stdio.h>#include <tchar.h>#include <SDKDDKVer.h>#define MAKEUS(a, b) ((unsigned short) ( ((unsigned short)(a))<<8 | ((unsigned short)(b)) ))#define MAKEUI(a,b,c,d) ((unsign

2016-11-17 14:01:44 9784 2

转载 c++各种排序效率相比较

各种排序效率#include<iostream>#include<algorithm>#include<windows.h>using namespace std;#define N 300000//#define RANDOM#define MYDEBUGint* array=NULL;void Maopao(int* array,int begin,int last){

2016-09-07 16:37:42 1265

原创 怎么判断一个数是不是2的n次方

怎么判断一个数是不是2的n次方#include <stdio.h>void judge_n(int a){ int b = a - 1; if ((a & b) == 0) { printf(是2的n次方); return; } else { printf(不是2的n次方); re

2016-09-07 10:58:33 1471

原创 c++字符替换代码

文件处理时候的替换操作 std::string::size_type find1 = desFilePath.find("\\"); while (find1 != std::string::npos) { desFilePath.replace(find1, 1, "/"); find1 = desFilePath.find("\\");

2016-08-26 17:55:32 1044

原创 c++获取文件大小

static bool changeVariant(const std::string &url){ if (url.empty()) { return false; } size_t dataLenth = 0; //unsigned char *pFileData = crossUtil::AssetUtil::getInstance()

2016-08-24 14:45:58 745

原创 c 二分查找

int binarySearch(int *a, int n, int data){ int low, mid, high; //search fail if(a = null) return -1; low = 0; high = n -1; while(lown <= high) { mid = (low + high)

2016-07-11 16:52:13 270

原创 c 快速排序

void quiksort(int a[], int low, int high){ int i = low; int j = high; //取个中间变量 int temp = a[i]; if (low < high) { while (i < j) { //从右往左查找比中间变量小的第一个元素

2016-07-11 16:45:33 274

原创 vs配置信息问题

右击项目->属性->配置属性->常规->项目默认值->配置类型,可以配置为exe,dll,lib三种 1.exe可执行文件 2.dll动态库,程序移动到其他项目或者平台时必须要导入的 3.lib为静态库,可以嵌入到其他项目,移动时无需导入单击项目->属性->c/c++->代码生成->运行库所有项目如果引用,运行库必须一致

2016-07-04 20:46:09 258

转载 c++继承中拷贝构造问题

子类拷贝构造要先调用父类的拷贝构造 详情请看下面代码class base {public: base(int initialvalue = 0): x(initialvalue) {} base(const base& rhs): x(rhs.x) {}private: int x;};class derived: public base {public: derived(i

2016-06-30 11:07:13 822

转载 javaScript中的this的使用

1) 函数有所属对象时:指向所属对象var myObject = {value: 100};myObject.getValue = function () { console.log(this.value); // 输出 100 // 输出 { value: 100, getValue: [Function] }, // 其实就是 myObject 对象本身 console.log(this

2016-06-22 16:37:09 336 1

原创 python文件处理

这篇文章主要是介绍python的对于文件的处理#次函数不能单独运行,大家只需看用法即可def _updateShellClass(jsClass, cppDir, srcRelativePath): className = jsClass.className if 0 == len(className): return bindingClassName = c

2016-06-08 16:13:51 393

原创 c++中 static修饰修饰类声明部分

xx.h#include class Example{public:    static const double rate;    static const int vecSize = 2;    static vector vec;};xx.c#include #include #include "Tan.h"using namespac

2016-05-18 13:57:17 374

原创 c++ error LNK2019问题

error LNK2019: 无法解析的外部符号 __imp__xxxxxx@0,该符号在函数 _main 中被引用更多  error LNK2019: 无法解析的外部符号 __imp__xxxxxx@0,该符号在函数 _main 中被引用遇到这种问题一般都是由于缺少相应的库文件右击项目,选择“属性”--“链接器”--“输入”--“附加依赖项

2016-05-18 10:46:04 680

原创 c++ const修饰函数体,修饰返回值,修饰参数,和底层顶层指针的区别的简易

1.const修饰函数体说明函数不能修改类成员属性2.const修饰返回值说明返回值不能被修改3.const修饰参数说明参数不能被修改4.底层指针指的是const修饰的对象是个常量,顶层则表示指针是个常量,赋值的话只能用顶层赋值底层,或者底层赋值给底层,否则出错

2016-05-18 10:01:01 275

原创 c++ geogle v8见解

1.js想要访问c++中的代码,必须通过handle,2.c++想要访问js的数据,需要注册c++的代码,然后通过handle访问,

2016-05-17 13:48:04 408

原创 vs编译器重新生成解决方案问题

vs生成解决方案后,即可直接执行,不需要再次调试,项目大的时候超级浪费时间

2016-04-26 13:13:25 1050

原创 c单链表基本操作,本人已祥测

#include #include #include using namespace std;typedef int elemType;typedef struct Node{elemType element;struct Node *next;}Node;Node *l;//初始化void init_liat(Node *i){

2016-04-23 17:43:13 669

c++生成二维码源码

生成二维码源码,本人已经编过,如涉及侵权内容,希望大家下载

2017-12-11

python通信

python3.6版本之间管道通信代码,大家可以借鉴互相提高

2017-11-17

python管道之间的通信

python3.6版本进程之间通信,以上是python进程之间通信

2017-11-17

c++获取图片的资源

c++图形类

2016-11-17

ios传智全套视频代码

上面的只是新浪微博项目的一节,下面的百度网盘是全套的免费的:http://pan.baidu.com/s/1hrXHbIs

2016-06-14

ios代码下载

ios代码例如控件之类的

2016-06-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除