Reputation: 12327
I'm trying to get the C++ version I'm using, which I assumed was an easy task as developers need the version number to see which functionality is available (or is that a wrong assumption)? I tried the advised method from here:
auto someversion = __cplusplus;
std::cout << someversion;
which shows:
199711
According to the linked answer that means im using C++98. Is this correct or is there another method to get the right version number?
I also tried running the command:
g++ --version
But the command did not run (Command "g++" is not valid.). How do I find out which C++ version I am running?
edit: context
So how does one see which functionality is available or do you just need to try and find out? I'm trying async but when i copy the example my syntax is not valid, thats when I checked for the version number to see if the syntax from the example was useable with my setup. (the example : )
Upvotes: 2
Views: 1348
Reputation: 8501
Run:
cl
The output should be something like this:
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86
Then, see Visual C++ Language Conformance to check exactly which features are supported by your compiler.
Upvotes: 1