Amitised

Amitised

C++ 11/17 Support in VS Code

C++ 11/17 Support in VS Code

Subscribe to my newsletter and never miss my upcoming articles

Go to Settings > User Settings In here, search for Run Code Configuration:

Under this menu, find: "code-runner.executorMap"

Edit this Setting by adding it to User Setting as below for C++11 support:

"code-runner.executorMap":{
    "cpp": "cd $dir && g++ -std=c++11 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
},

OR

Edit this Setting by adding it to User Setting as below for C++17 support:

"code-runner.executorMap":{
    "cpp": "cd $dir && g++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
},

Hope this helps !

 
Share this