摘要:
很尴尬 二重指针之间转化,可以直接通过(classType**)转化 基类转派生类;static_cast(最好在debug下用dynamic_cast检查一下) 派生类转基类:隐式转化 阅读全文
posted @ 2018-08-04 16:42
maolike
阅读(242)
评论(0)
推荐(0)
|
摘要:
很尴尬 二重指针之间转化,可以直接通过(classType**)转化 基类转派生类;static_cast(最好在debug下用dynamic_cast检查一下) 派生类转基类:隐式转化 阅读全文
posted @ 2018-08-04 16:42
maolike
阅读(242)
评论(0)
推荐(0)
摘要:
Visual Studio工具,像下面这样一步一步来: 先选择左侧的C/C++->命令行,然后在其他选项这里写上/d1 reportAllClassLayout,它可以看到所有相关类的内存布局,如果写上/d1 reportSingleClassLayoutXXX(XXX为类名),则只会打出指定类XX 阅读全文
posted @ 2018-07-04 22:29
maolike
阅读(908)
评论(0)
推荐(0)
摘要:
You can find out what is causing Visual Studio to think each project is out of date, and then address the issue directly. Select Tools → Options → Pro 阅读全文
posted @ 2018-07-04 22:20
maolike
阅读(140)
评论(0)
推荐(0)
摘要:
文件映射的三个功能: 1、File mapping allows the process to use both random input and output (I/O) and sequential I/O. 2、It also allows the process to work effici 阅读全文
posted @ 2018-06-25 10:00
maolike
阅读(209)
评论(0)
推荐(0)
摘要:
由于参数必须是must be double-null terminated,所以要这么做,不然删除文件夹会失败的 阅读全文
posted @ 2018-06-20 19:10
maolike
阅读(202)
评论(0)
推荐(0)
摘要:
因为一个账号只能在一个客户端登陆,用同一个账号的话,必然有一个会拉取失败,提示unable connect to url 解决方法: 清楚一下即可 阅读全文
posted @ 2018-06-19 20:09
maolike
阅读(2954)
评论(0)
推荐(0)
摘要:
GET方式提交的数据最多只能有1024字节,而POST则没有此限制。 大文件传输用post(),小文件用get(), 第一次接触Qt的Http项目,今天看了一下Post和Get的基本使用方法,就开始尝试了。原先以为Post专门用于向服务器发送请求,然后接收服务器应答的; 而Get只是单纯从服务器获取 阅读全文
posted @ 2018-06-11 20:34
maolike
阅读(1345)
评论(0)
推荐(0)
摘要:
C++中L和_T()之区别 字符串前面加L表示该字符串是Unicode字符串。_T是一个宏,如果项目使用了Unicode字符集(定义了UNICODE宏),则自动在字 符串前面加上L,否则字符串不变。因此,Visual C++里边定义字符串的时候,用_T来保证兼容性。VC支持ascii和unicode 阅读全文
posted @ 2018-06-04 09:24
maolike
阅读(379)
评论(0)
推荐(0)
摘要:
令一个类展现类似于指针行为的最好方法是使用shared_ptr来管理类中的资源。 拷贝(赋值)一个shared_ptr会拷贝(赋值)shared_ptr所指向的指针(可以认为shared_ptr有一个引用计数器);当没有用户使用对象时,shared_ptr类自己会释放资源。智能指针比普通指针的好处主 阅读全文
posted @ 2018-05-03 10:39
maolike
阅读(426)
评论(0)
推荐(0)
|