花之慶次 2008-4-6 09:21
有關Visual C++的問題
留意以下的程式:
#include"stdafx.h"
#include<Windows.h>
int main(int argc, char*argv[])
{
MessageBox(NULL, "Hello, Hacker Program", "Test", 0);
return 0;
}
但當執行這個程式時竟然會是:
無法啟動程式:c\documents and settings\user\my documents\visual studio2005\projects\test\test\debug\test.exe
而有關輸出是這樣的:
------ 已開始建置: 專案: test, 組態: Debug Win32 ------
正在編譯...
test.cpp
c:\documents and settings\user\my documents\visual studio 2005\projects\test\test\test\test.cpp(5) : fatal error C1083: 無法開啟包含檔案: 'Windows.h': No such file or directory
已將建置記錄儲存於 "file://c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\Test\test\test\Debug\BuildLog.htm"
test - 1 個錯誤,0 個警告
========== 建置: 0 成功、1 失敗、0 最新、0 略過 ==========
那我該怎麼辦呢??
那是不是有必要下載一些軟件才可做到呢??
[[i] 本帖最後由 花之慶次 於 2008-4-6 09:25 編輯 [/i]]
花之慶次 2008-4-6 22:37
此外我還發現一個問題:
VC++專案無法使用IntelliSense資訊, 因為無法開啟IntelliSense資料庫檔案C:\Documents and Settings\User\My Documents\Visual Stdio 2008\projects\MessageBox\MessageBox.ncb進行寫入
如果方案是唯讀的則其他功能也會受到影響
我應該如何解決問題呢??
laizhenyuan 2008-4-7 04:27
建议使用vc6.0吧,你这个错误应该是找不到相应的头文件,在vc6.0下建立windows application应该不会出现响应的问题,vs2005中可能是哪里设置不对,具体也不清楚哈,我一般开发.net才用vs2005,
simpo 2008-4-14 20:46
Well, there are many reference and learning material online
sgjiangjiang 2008-4-16 22:16
樓上的就會這一句啊,暈
你的是Express版嗎?