where to create the macro in compiler configuration, so when compile, it will only compile part of the code that is defined by the macro? something like \D Load_FILE thanks.
i think you are looking for preprocessor definitions. in your source code: #ifdef Load_FILE cout << "Load_FILE is defined"; #else cout << "Load_FILE is not defined"; #endif in your compiler settings, add: -DLoad_FILE without space between -D and your preprocessor definition.
【在 G*****7 的大作中提到】 : i think you are looking for preprocessor definitions. : in your source code: : #ifdef Load_FILE : cout << "Load_FILE is defined"; : #else : cout << "Load_FILE is not defined"; : #endif : in your compiler settings, add: : -DLoad_FILE : without space between -D and your preprocessor definition.
p*r
11 楼
already got the answer. thanks.
【在 p****r 的大作中提到】 : where to create the macro in compiler configuration, so when compile, it : will only compile part of the code that is defined by the macro? something : like : \D Load_FILE : thanks.