DEV Community

[Step By Step Guide] How to set up visual studio code for C and C++ programming 2021.

Narottam04 on June 02, 2021

Why should you use visual studio code ? Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS...
Collapse
 
nandulakarthik profile image
Karthik Nandula

Just one thing I'd add to this, after I installed mingw, I was trying to run my c file but it didn't work because my vs code needed a restart, so if vs code was already open before installing mingw, just give vs code a restart and everything should work.

Collapse
 
divyanshpal profile image
divyansh343

it's really helpful. its worth reading

Collapse
 
narottam04 profile image
Narottam04

Glad you find it helpful!

Collapse
 
nnennajohnrain profile image
Nnennajohn-rain

This was super helpful, you're amazing! Thank youuuu.

Collapse
 
mohamedabdulla profile image
Mohamed Abdulla

really helpful
__

Collapse
 
mohammadzakaria profile image
Mohammad Zakaria

thank you...i set up my vs code following this guide...

Collapse
 
narottam04 profile image
Narottam04

I'm glad, you found it helpful.

Collapse
 
mario_8570fef5c39c72f5cc4 profile image
Mario

guys can somebody explain me at which point whilst creating a project the compiler will detect which chip i have for example i have a Mac system with m1 chip. Are there any files, which are detecting my software and chipset?

Collapse
 
krishna5512 profile image
Krishna pd Timilshina

really helpful

Collapse
 
reihadi profile image
Reihane

Thank you!
when I run my code, I see this error:

'g++' is not recognized as an internal or external command,
operable program or batch file.

What am I supposed to do?

Collapse
 
godangler profile image
Gabriella Dangler • Edited

Hi! Here years later and I get this same error. Did you ever figure out the problem?

[EDIT:] Restarted VSC and saved my file - now my code runs fine! :)