06 2017 档案
C++判断文件是否存在
摘要:用ifstream判断,若存在则可以创建文件输入流。 e.g. ifstream fin(FileName); if(fin) { fin.close(); DeleteFile(FileName); } 阅读全文
posted @ 2017-06-22 14:51 笨nora 阅读(6984) 评论(0) 推荐(0)
Compiling in Unicode but need to save txt in UTF-8(MFC)
摘要:背景:Compiling in Unicode but need to save txt in UTF-8(MFC) 解法: CString cs_test=_T(“TEST”); CT2A _ cs_test( cs_test,CP_UTF8); CFile m_sFile(_T("D:\test 阅读全文
posted @ 2017-06-22 14:28 笨nora 阅读(206) 评论(0) 推荐(0)
Linking a C++ DLL 引发LNK1120和LNK2019问题的解决方案
摘要:背景:MFC中一个project App需引用另一个project Dll中的其中一个类的方法。 错误信息: error LNK1120: 1 unresolved externals error LNK2019: unresolved external symbol "public: static 阅读全文
posted @ 2017-06-05 11:40 笨nora 阅读(3423) 评论(0) 推荐(0)
warning C4627: '#include "myLog.h"': skipped when looking for precompiled header use
摘要:解决此warning的方法: 在.cpp文件的第一行写上 #include "stdafx.h" 阅读全文
posted @ 2017-06-02 16:19 笨nora 阅读(703) 评论(0) 推荐(0)