vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

Update default settings of code-runner.executorMap to support c++11 or higher versions

Open ismailhkose opened this issue 7 years ago • 6 comments

Could you please add "-std=c++11" or the higher version to code-runner.executorMap in the default settings?

It doesn't recognize many improvements in C++ after c++11, and fails. I am very new to VS Code and spent several hours to figure this out.

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

ismailhkose avatar Nov 25 '18 07:11 ismailhkose

Great idea!

phrogg avatar May 06 '19 17:05 phrogg

Thank you! Almost the same situation for me. You maybe save me several hours!

Raw-Paradox avatar Dec 13 '19 09:12 Raw-Paradox

thank you !

Anusree6154s avatar Jul 17 '23 11:07 Anusree6154s

Oh my gawk , I legit factory reset my MBP m2 since I couldn't compile my c++ code according to the new advancements and make use of c++17 , despite knowing that clang supports it . Legit erased my MacBook . After Reading the whole VSCode documentation on clang and coming across couple of StackOverflow questions , I finally changed the standard and added the c++17 argument . I've been coding for a year or more and for the first time in my life , I feel like an engineer , reading the documentation , working with the problem . Understanding how VSCode , the launch.json and tasks.json work in it and about code runner .

hexs00si avatar Dec 03 '23 12:12 hexs00si