C/C++
zsdydl
奋斗改变命运!
展开
-
CFileFind类使用
是Visual C++的MFC类CFileFind吧?成员函数isdots()检测的是『.』『..』这两个目录。 这是一个操作系统相关的概念。 . - 代表当前的目录;而.. - 代表上一层的目录。举例来说:如果程序的当前目录是:c:\windows\temp, 那么. =c:\windows\temp; 而.. = c:\windows 在操作系统中(Windows, xNix等),每一转载 2016-03-03 16:49:34 · 4618 阅读 · 2 评论 -
将CString 转换为 TCHAR*
//*********************************************************************** //* 函数: TransCStringToTCHAR //* 描述:将CString 转换为 TCHAR* //***************************************************************原创 2016-02-29 08:44:00 · 729 阅读 · 0 评论 -
MFC在添加gsoap生成的源文件到工程项目中,出现bug: MFC apps must not #include <windows.h>
问题:MFC在添加gsoap生成的源文件到工程项目中,出现bug: MFC apps must not #include 解决方案:经研究是因为在stdsoap2.cpp和XXXProxy.cpp文件中引入stdafx.h时没把#include "stdafx.h"放在第一行,所以解决方案就是应该首先包含头文件#include "stdafx.h",重新编译一切OK了!!!原创 2016-12-02 10:37:55 · 334 阅读 · 0 评论 -
MBCS,UNICODE,UTF-8之间的转换
1. ANSI to Unicodewstring ANSIToUnicode( const string& str ){ int len = 0; len = str.length(); int unicodeLen = ::MultiByteToWideChar( CP_ACP,0,str.c_str(),-1,NULL,0 ); wchar_t * pUnicod原创 2017-04-15 15:14:23 · 2506 阅读 · 0 评论