0
請看看下面的代碼編譯只有一個的if-else
#include <iostream>
using namespace std;
int main(){
#if true
int fd = 0;
#else
int dd =0;
#endif
cout<<fd;
//cout<<dd;
system("pause");
return 0;
}
部分。在這裏,我試圖編譯只有一個街區。如果'如果'編譯,那麼'其他'不應該像智慧一樣。但是這不起作用。請幫忙。
它不起作用? LWS測試運行良好。 – chris 2013-04-07 06:18:14
適用於我的機器(gcc版本4.2.1(基於Apple Inc. build 5658)(LLVM build 2336.11.00))。你使用什麼編譯器? – 2013-04-07 06:22:21
什麼是不工作,以及如何?請描述你的預期和實際結果。 – 2013-04-07 06:35:42