Ask for a new workspace. Ask for a new workspace type of "Console". Include <afx.h> and <afxwin.h> and whatever else you need. Use the "Project Settings" dialog to say how you want to link to MFC. Add an instance of CWinApp or a CWinApp-derived object to your application. Correctly initialize MFC
Include <afx.h> and <afxwin.h> and whatever else you need. Use
the "Project Settings" dialog to say how you want to link to MFC.
Add an instance of CWinApp or a CWinApp-derived object to your
application. Correctly initialize MFC
好象不是那么简单吧 我也把stdafx.h文件给删除了 但无论如果都不能通过
我是创建了一个空的项目 也就是里面什么都没有
选中Use precompiled header file(.pch)
Through header: stdafx.h
那就Automatic use of precompiled header
Cannot open include file: 'stdafx.h': No such file or directory你创建工程的时候, 不要选 Empty, 就有'stdafx.h'了, 在哪, 你工程的目录下.你要是自己Include, 路径就不是工程的目录下了.