I can't change C++ version in VS Code

Viewed 796

I want to change C++ standard to C++20. I wrote "C_Cpp.default.cppStandard": "c++20" in setting.json and "cppStandard": "c++20", in c_cpp_properties.json, but when I run this code

#include <iostream>

int main(){ 
   std::cout << __cplusplus;
}

my output is: 201402.

What I need to do to change my C++ version in VS Code?

1 Answers

See this link on configuring the tasks.json file. For your case, you'll need to add the -std=c++2a in the args variable.

Related