摘要: // Cast a dynamically allocated string to 'void*'. void *vp = static_cast<void*>(new std::string("it's easy to break stuff like this!")); // Then, in 阅读全文
posted @ 2018-11-22 19:13 kuaqi 阅读(214) 评论(0) 推荐(0)
摘要: string、char[]、char*、const char*; 输出都一样 printf只能输出c语言中的内置数据,string不是c语言内置数据; cout可以输出string字符串,是因为string中重载了“<<”操作符; printf_s("%s\n", arrc); \\char[]pr 阅读全文
posted @ 2018-11-22 19:09 kuaqi 阅读(252) 评论(0) 推荐(0)
摘要: 在处理LPTSTR或LPCTSTR的时候,应该使用_tcslen来替代strlen函数。否则,在Unicode编码方式下,strlen不能处理wchar_t*的字符串。 阅读全文
posted @ 2018-11-22 18:55 kuaqi 阅读(427) 评论(0) 推荐(0)
摘要: 格式: CString cstr.AppendFormat(_T(" %.4f "), ); 输出: (1) https://blog.csdn.net/overlord_bingo/article/details/60140224 不含中文的情况下: CString s("hello world" 阅读全文
posted @ 2018-11-22 18:25 kuaqi 阅读(252) 评论(0) 推荐(0)
摘要: 模板声明只能在全局、命名空间、或类范围内使用; 阅读全文
posted @ 2018-11-19 18:43 kuaqi 阅读(108) 评论(0) 推荐(0)
摘要: cin 遇到空格完成单个数据传入,不退出; 遇到回车'\n'退出; 阅读全文
posted @ 2018-11-19 11:17 kuaqi 阅读(458) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/wanghetao/p/4492582.html https://www.cnblogs.com/Dageking/p/3185230.html http://www.cnblogs.com/catch/p/4314256.html:初始化 https 阅读全文
posted @ 2018-11-18 19:03 kuaqi 阅读(2553) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/songdanzju/p/7422380.html https://blog.csdn.net/chudongfang2015/article/details/76326115 https://www.cnblogs.com/Dageking/p/31 阅读全文
posted @ 2018-11-17 23:39 kuaqi 阅读(440) 评论(0) 推荐(0)
摘要: 导入lib与双重设置头文件(生成dll和exe调用dll时) #ifndef AAA#ifdef BB_API :BB_API可以放在生成dll的cpp中#define AAA __declspec(dllexport)#else#define AAA __declspec(dllimport)#p 阅读全文
posted @ 2018-11-17 20:13 kuaqi 阅读(238) 评论(0) 推荐(0)
摘要: uint32_t是C/C++ 标准中定义的类型。 而uint32是 某些 编译器定义的别名,以方便使用。类似: uint32_t 比 uint32的可移植性更好 。 阅读全文
posted @ 2018-11-16 17:00 kuaqi 阅读(14632) 评论(0) 推荐(0)