C++學習筆記1

選擇控制檯,空項目string

#include <afxcoll.h>編譯

class CDrawBox:public CObject
{
public:
 void DoDraw(char *string);
} ;class

void CDrawBox::DoDraw(char *cValue)
{
 fprintf(stdout,cValue);
}
int main()
{
    CDrawBox oMyDraw;
 fprintf(stdout,"ssdfdfdf");
    oMyDraw.DoDraw("It's a box!");
 return 0;
}thread

 

編譯後出現以下錯誤:基礎

nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/jnHid.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.bug

解決方法:方法

工程 ---設置---常規error

Microsoft基礎類   改成:使用MFC做爲共享的DLL項目

相關文章
相關標籤/搜索