I am setting up the environment to learn C++. I am using VS Code as an IDE and MinGW as a Compiler. but it
seems that i can't run C++17 code without alot of errors. So i used the following code to check C++ version
#include<iostream>
int main() {
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 << "pre-standard C++";
}
it returns C++14. I googled it but ended up with "Change your IDE" which i cant because i have a very low end Laptop which can bearly handle VS Code without screen freezing. I have also seen the "g++ -std=c++17 file.cpp" tip which didnt work either. I would appreciate it if someone can help me without changing the IDE.
(i have also downloaded the C++ package from the Microsoft Visual Studio installer which was around 6GB and used "CL" as a Compiler in VS Code but it returns C++98 when running the above code for some reason.)