文号
t21162
阅读
5946
回复
6
收藏
3
有關c++問題
2009/11/30
IP:香港
在下下載了vc++2008 Express
#include "stiod.h"不能用........換了#include "stdafx.h"........"
是什麼問題呢??
t-600作者
17年1个月前IP:未同步
168819
1楼
1>c:\\documents and settings\\administrator\\my documents\\visual studio 2008\\projects\\06\\06\\06.cpp(5) : warning C4627: '#include "lua.h"': 尋找先行編譯標頭使用時略過1>        新增指示詞到 'stdafx.h' 或重建先行編譯標頭
1>c:\\documents and settings\\administrator\\my documents\\visual studio 2008\\projects\\06\\06\\06.cpp(6) : warning C4627: '#include "lualib.h"': 尋找先行編譯標頭使用時略過1>        新增指示詞到 'stdafx.h' 或重建先行編譯標頭
1>c:\\documents and settings\\administrator\\my documents\\visual studio 2008\\projects\\06\\06\\06.cpp(7) : warning C4627: '#include "lauxlib.h"': 尋找先行編譯標頭使用時略過1>        新增指示詞到 'stdafx.h' 或重建先行編譯標頭
1>c:\\documents and settings\\administrator\\my documents\\visual studio 2008\\projects\\06\\06\\06.cpp(25) : fatal error C1010: 尋找先行編譯標頭檔指示詞時碰到未預期的檔案結尾。您的原始檔中是否忘了加上 '#include "stdafx.h"'?
1>已將建置記錄儲存於 "file://c:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2008\\Projects\\06\\06\\Debug\\BuildLog.htm"1>06 - 1 個錯誤,3 個警告
========== 建置: 0 成功、1 失敗、0 最新、0 略過 ==========
#include "stiod.h"
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
.................................................囧RZ [s:261]
引用
评论
17年1个月前IP:未同步
168832
2楼
如果使用了precompiled header,则规定程序里必须先#include "stdafx.h"。

如果选择不使用precomplied header,就没有这个问题,只是程序大的话编译速度比较慢。
引用
评论
t-600作者
17年1个月前IP:未同步
168843
3楼
噢........!原來如此
引用
评论
t-600作者
17年1个月前IP:未同步
168849
4楼
另外能否看看出現了什麼出了問題嗎?
#define WIN32_LEAN_AND_MEAN
#include <window.h>
#include <windowx.h>

int WINAPIWinMain(HISTANCE hinstance,
                    HISTANCE hprevinstance,
                    LPSTR lpcmdline,
                   int ncmdshow);
{
    //call message box API
    MessageBox(NULL,"whatup,loil?",
        "notthing",MB_OK);
    //EXIT program
    return 0;
}//end WinMain
引用
评论
17年1个月前IP:未同步
168886
5楼
stdio???????
引用
评论
t-600作者
17年1个月前IP:未同步
168888
6楼
stdio和stdafx兩者都不行................"
window和windowx沒有此類的檔案或消毀了此類的檔案............" [s:261]
引用
评论
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的