首先写一段.cpp,并且执行
using namespace std;
int main(){
//func();
int x= __cplusplus;
cout << x<<endl;
return 0;
}
然后根据输出的x数值对应到相应的C++版本
g++ main.cpp
199711
g++ -std=c++11 main.cpp
201103
g++ -std=c++14 main.cpp
201402
g++ -std=c++17 main.cpp
201500
g++ --version

7835

被折叠的 条评论
为什么被折叠?



