摘要: cin 遇到空格完成单个数据传入,不退出; 遇到回车'\n'退出; 阅读全文
posted @ 2018-11-19 11:17 kuaqi 阅读(435) 评论(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 阅读(2525) 评论(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 阅读(373) 评论(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 阅读(224) 评论(0) 推荐(0) 编辑
摘要: uint32_t是C/C++ 标准中定义的类型。 而uint32是 某些 编译器定义的别名,以方便使用。类似: uint32_t 比 uint32的可移植性更好 。 阅读全文
posted @ 2018-11-16 17:00 kuaqi 阅读(14408) 评论(0) 推荐(0) 编辑
摘要: 1.c_str 返回值是const char*,不能直接赋值给char*; 如果改变了string对象s的内容;s.c_str指向的内容也会改变; char* c; string s="1234"; c = s.c_str(); //c最后指向的内容是垃圾,因为s对象被析构,其内容被处理 应该这样用 阅读全文
posted @ 2018-11-15 19:15 kuaqi 阅读(202) 评论(0) 推荐(0) 编辑
摘要: C/C++ 中关于以下三种定义: const char *ptr; 不可以通过该指针改变指向内容;可以指向别的内容; char const *ptr; 同上; char* const ptr; 指针指向固定;指向内容可以改变; const char* const ptr; 现整理三者之间的区别与联系 阅读全文
posted @ 2018-11-15 18:26 kuaqi 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 1. 如果你认为你的程序可能在Unicode的环境下运行,那么开始在意用 Unicode 编码。比如说,不要用 sizeof() 操作符来获得字符串的长度,因为在Unicode环境下就会有2倍的误差。我们可以用一些方法来隐藏Unicode的一些细节,比如在我需要获得字符长度的时候,我会用一个叫做DI 阅读全文
posted @ 2018-11-09 11:32 kuaqi 阅读(217) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/u014260892/article/details/51841035 https://www.cnblogs.com/lizhenlin/p/6242483.html 什么是ANSI,什么又是UNICODE呢?其实这是两种不同的编码方式标准,ANSI中的 阅读全文
posted @ 2018-10-15 22:14 kuaqi 阅读(1195) 评论(0) 推荐(0) 编辑
摘要: MFC中或你包含的是CString头文件,如果想用cout输出string 类型,则需要先把string类型转换char*型,如上面例子: #include<iostream>#include<CString> using std::cout;using std::string ;using std 阅读全文
posted @ 2018-10-07 17:41 kuaqi 阅读(1064) 评论(0) 推荐(0) 编辑