小海棠 江苏专区:Microsoft Visual C++ 2005 速成版
来源:百度文库 编辑:中科新闻网 时间:2024/05/08 11:07:26
我从一本游戏编程书上看到如下代码,在Microsoft Visual C++ 2005 速成版中进行编译,错误。我从include 文件夹中根本找不到下面的头文件,这是为何?
#define WIN32_LEAN_AND_MEAN
#include<windows.h>
#include<windowsx.h>
#include "stdafx.h"
int WINAPI WINMAIN(HINSTANCE hinstance,HINSTANCE hprevinstance,LPSTR lpcmdline,int ncmdshow)
{
MessageBox(NULL,"there can be only one!!!","My first windows program!"MB_OK|MB_ICONEXCLAMATION);
return 0;
}
fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.这是为什么?
#define WIN32_LEAN_AND_MEAN
#include<windows.h>
#include<windowsx.h>
#include "stdafx.h"
int WINAPI WINMAIN(HINSTANCE hinstance,HINSTANCE hprevinstance,LPSTR lpcmdline,int ncmdshow)
{
MessageBox(NULL,"there can be only one!!!","My first windows program!"MB_OK|MB_ICONEXCLAMATION);
return 0;
}
fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.这是为什么?
"stdafx.h" 为Visual C++ 2005 新建项目时 自动添加的”预编译头文件“
是为了提高编译速度。
如果你是直接把这段复制到一个空文档里去,当然不存在stdafx.h 文件
看你这里也没有用到,可以直接把#include "stdafx.h" 这一句删掉
哪儿有Microsoft Visual C的下载?
Microsoft Visual C++....什么意思啊。。。
Microsoft Visual C++Runtime Libvary 是什么意思
为什么Microsoft Visual C 老是提示这个?
Microsoft Visual Studio v6.0 和Visual C++、Visual Basic6.0有什么区别?
每次开机总显示Microsoft visual c + + Runtime Library
如何用Microsoft Visual FoxPro来编写C语言
Microsoft Visual C 6.0 SPx Method 1 [Overlay]
Microsoft Visual C++"在哪里有下载啊?
C语言设计软件和Microsoft Visual C++的区别