Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- if ( __cplusplus == 202101L) std::cout << "C++23";
- else if (__cplusplus == 202002L) std::cout << "C++20";
- else if (__cplusplus == 201703L) std::cout << "C++17";
- else if (__cplusplus == 201402L) std::cout << "C++14";
- else if (__cplusplus == 201103L) std::cout << "C++11";
- else if (__cplusplus == 199711L) std::cout << "C++98";
- else std::cout << "__cplusplus: " << __cplusplus;
- std::cout << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement