0
在我的系统centos7.0, 当我编译使用g ++ TEST.CPP -o测试, 输出 “是Linux系统”克++在C11编译器宏
当编译使用g ++ TEST.CPP代码-std = C++ 11 -o test 输出是“不是linux系统”
为什么在c11中编译器的默认宏改变了?
TEST.CPP
#include <iostream>
using namespace std;
int main(){
#ifdef linux
cout<<"is linux system\n";
#else
cout<<"is not linux system\n";
#endif
return 0;
}