Visual C++ 编程
AldisZhan
We are the heroes of our time.
But we're dancing with the demons in our minds.
展开
-
MFC中CString类与其他类型的转换
MFC数据类型转换标准库std的string 和MFC类库CString之间的转换1 string to CString CString.format("%s",string.c_str());2 CString to stringstring str(CString.GetBuffer(str.GetLength()));3 string to ch原创 2009-09-24 18:41:00 · 1890 阅读 · 0 评论 -
VC 中字符串比较和查找
目前可以认为最高效的方式是调用:StrChrI 因为这是API,不是CRT函数。 由于相应的DLL早已经加载到内存,所以调用起来高效。 另,可参考: 常用字符串函数 1. 字符串比较函数 //比较两个字符串是否相同 int StrCmp(LPCTSTR lpStr1,LPCTSTR lpStr2); int StrCmpN(LPCTSTR l转载 2009-09-30 12:49:00 · 10540 阅读 · 0 评论