Advertisement
STANAANDREY

cpp version

Sep 30th, 2024
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     if (     __cplusplus == 202101L) std::cout << "C++23";
  6.     else if (__cplusplus == 202002L) std::cout << "C++20";
  7.     else if (__cplusplus == 201703L) std::cout << "C++17";
  8.     else if (__cplusplus == 201402L) std::cout << "C++14";
  9.     else if (__cplusplus == 201103L) std::cout << "C++11";
  10.     else if (__cplusplus == 199711L) std::cout << "C++98";
  11.     else std::cout << "__cplusplus: " << __cplusplus;
  12.     std::cout << std::endl;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement