Created
August 20, 2018 04:12
-
-
Save j2doll/516889ba1e85d482d4dda9f6ca701cfd to your computer and use it in GitHub Desktop.
gcc(g++) C++ STL version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // for checkg support C++ (using g++) | |
| // | |
| // g++ -std=c++98 main.cpp | |
| // g++ -std=c++03 main.cpp | |
| // g++ -std=c++0x main.cpp | |
| // g++ -std=c++11 main.cpp | |
| // g++ -std=c++14 main.cpp | |
| // g++ -std=c++17 main.cpp | |
| #include <iostream> | |
| using namespace std; | |
| int main(){ | |
| int cpp = (int) __cplusplus; | |
| int year = cpp / 100; // 1997 ... 2017 | |
| int month = cpp % 100; | |
| cout << "Year:" << year << " Month:" << month << endl; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment