看板 NTUBIME101HW 關於我們 聯絡資訊
怪了怪了.... 我明明就是照著課本上打的 為什麼complie會不過XD 各位神手幫我看看吧^^ #include <iostream> using namespace std; int main() { cout << "hello there world!"; return 0; } 我去compile的時候 他就會給我 unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? 什麼意思阿?? 最簡單的東西都做不出來.... 真挫折> < -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.168.20.172
zumwohl:#include <cstdlib> 09/29 14:25
zumwohl:是不是一定要打這個.... 09/29 14:25
happierway:用dev就不會有這種情況出現 09/29 14:29
masgnate:所以要換版本囉?? 09/29 14:31
zumwohl:dec C++會直接幫你打好標頭,其他我不知道會不會 09/29 14:32
masgnate:visual C++ 的開頭是 #include "stdafx.h" 09/29 15:03
masgnate:然後下面是 int _tmain(int argc, TCHAR* argv[]) 09/29 15:04
masgnate:這樣有怪怪的嗎?? 09/29 15:11
smilekao:你上面的程式碼我用visual c++幫你跑過,沒有問題ㄝ... 09/29 16:11
masgnate:?! 怎麼會這樣....... 09/29 16:24
masgnate:還是是我一開始選錯? 不是選WIN32嗎? 09/29 16:25
vincent79715:你答對了 09/29 16:40
vincent79715:專案要選他下面的那個 項目要選C++檔 09/29 16:41
masgnate:恩 不過還是有一點問題 09/29 16:47
masgnate:我開始debug之後 他就跟我說 09/29 16:48
masgnate:debugging information for 'project1.exe' cannot be 09/29 16:48
masgnate:found or does not match. Binary was not built with 09/29 16:49
masgnate:debug information 這樣是出了什麼錯阿?? 09/29 16:49
zumwohl:你要不要用用看dev C++阿 09/29 16:54
masgnate:歐搞定了 哭哭 真是謝謝各位XD 特別謝謝佑瑄^^ 09/29 17:02
smilekao:哈哈,我的師父是永軒 09/29 17:14
vincent79715:乖~ 徒弟出師了XD masgnate快叫師祖XD 09/29 17:52
ck940560:師姐XD 09/29 17:54
masgnate:歐 濕阻XD 09/29 18:18
vincent79715:喔~我相信你因該只是忘記選字XD 09/29 19:31
wind560212:小臉怎麼可能打錯呢XD 09/29 19:32
masgnate:科科XD 好啦 不管怎樣真是謝謝大家^^ 09/29 19:34