C++編譯基礎

#include "stdafx.h"

#ifdef WIN32
#define TEST 203
#else 
#define TEST 34
#endif

int _tmain(int argc, _TCHAR* argv[])
{
	int i = TEST;
	printf("%d", i);
	return 0;
}

運行結果:。程序中沒有看到有WIN32的定義,爲什麼是203呢? 原因是如下:預編譯。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章