How to compile C/C++ program in VS Code

For Windows:
  1. Install MinGW or Dev C++
  2. Open Environment Variables
  3. In System Variable select Path -> Edit -> New
  4. Copy this C:\Program Files (x86)\Dev-Cpp\MinGW64\bin to the New window. (If you have MinGW installed copy its /bin path).
  5. To check if you have added it successfully: Open CMD -> Type "gcc" and it should return: gcc: fatal error: no input files compilation terminated.
  6. Install C/C++ for Visual Studio Code && C/C++ Compile Run || Code Runner
  7. If you installed only C/C++ Compile Run extension you can compile your program using F6/F7
  8. If you installed the second extension you can compile your program using the "play" button in the top bar.


  1. Hello, thank you.
    I installed all but i have problem to run and cmd or output panel. idon't anything show me.



5G,1,Business,2,Bussiness,3,C,2,C++,4,CodeProject,3,Companies,5,Computer,1,,1,Facebook,1,Featured,1,Future,2,Google,4,Javascript,2,Microsoft,2,Motivation,6,PHP,3,Programmer,6,Programming,14,Projects,1,Python,3,Quantum,1,Quora,10,Software Development,3,Tech,4,VS Code,2,
9to5Programmer: How to compile C/C++ program in VS Code
How to compile C/C++ program in VS Code
In this tutorial you'll learn how to compile and run a C/C++ code in Visual Studio Code. Visual studio code compile c++, visual studio code c++ hello world, g++ is not recognized visual studio code, compile and run c++ program in visual studio code, compile and run cpp in visual studio code, how to setup visual studio code for c++,
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy