摘要: 办不到!!! windows只接受8bit的ANSI或者UTF16编码的文件名,你可以在代码里面使用utf8编码的文件名,但是当你打开文件时,你必须将其转化为8bit的ANSI或者UTF16编码的文件名。 幸运的是,VC++的std::ifstream 跟 std::ofstream对标准做了扩展, 阅读全文
posted @ 2020-02-22 11:21 ConfuciusPei 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 变长参数 参数个数类型不确定的函数, c语言例子如下 Technically to use variable number of arguments in C you include stdarg.h. From that you'll get the va_list type as well as 阅读全文
posted @ 2020-02-20 21:51 ConfuciusPei 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 首先要弄明白,当我们讨论导出函数时,我们在讨论什么? 函数实现在一个模块里面,需要在另一个模块里面调用,那么实现该函数的模块需要把这个函数设置为导出,以便其他模块使用。 这里面涉及到连个概念: 1,声明 2,实现 对于普通函数来说,声明跟实现是可以分开的。 模版的声明跟实现是在一个头文件里面的 模版 阅读全文
posted @ 2020-02-20 16:06 ConfuciusPei 阅读(260) 评论(0) 推荐(0) 编辑
摘要: An introduction to C++'s SFINAE concept: compile-time introspection of a class memberPosted on Sat 31 October 2015 inC++原文链接:http://jguegant.github.io... 阅读全文
posted @ 2015-12-28 19:25 ConfuciusPei 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 客户端程序无响应,卡死,卡顿了?抓个dump看下卡在哪里了。原文链接工具下载链接为什么会无响应windows的客户端程序一般都有一个主线程来处理消息,一般都在winmain函数中实现。主线程根据不同的消息做不同的任务,可以打开一个新的对话框,创建一个新线程等。用户的任何点击(鼠标),... 阅读全文
posted @ 2015-11-24 17:18 ConfuciusPei 阅读(912) 评论(0) 推荐(0) 编辑
摘要: The Pimpl technique is a useful way to minimize coupling, and separate interface and implementation. Here's a way to simplify Pimpl deployment.By Vlad... 阅读全文
posted @ 2014-09-22 10:45 ConfuciusPei 阅读(208) 评论(0) 推荐(0) 编辑
摘要: This topic demonstrates how to convert various Visual C++ string types into other strings. The strings types that are covered includechar *,wchar_t*,_... 阅读全文
posted @ 2013-07-04 14:29 ConfuciusPei 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Today's little program demonstrates how you can manipulate the positions of desktop icons.The entire program is just scaffolding to get us far enough ... 阅读全文
posted @ 2013-06-07 16:43 ConfuciusPei 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://forums.codeguru.com/showthread.php?315371-Visual-C-Debugging-How-to-use-ASSERT-and-deal-with-assertions-failuresQ:What is an assertion?A:A... 阅读全文
posted @ 2013-05-07 18:56 ConfuciusPei 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.cppblog.com/vczh/archive/2013/04/27/199765.htmlposted on 2013-04-27 17:24陈梓瀚(vczh)C++的指针的坑。剩下的坑留到下一篇文章里面。下面要讲的这个坑,如果不是在粉丝群里面被问了,我还不知道有... 阅读全文
posted @ 2013-04-30 13:33 ConfuciusPei 阅读(184) 评论(0) 推荐(0) 编辑