InstallationGuide-for-C onVSCode
InstallationGuide-for-C onVSCode
com/
- Add the path to your Mingw-w64 bin folder to the Windows Path environment variable.
- Check your MinGW installation
(g++ --version, gcc –version, gdb –vesion)
- Open VS Code
- Select the Extensions view icon on the Activity bar
- Search for 'C++'
- Select C/C++
- Click ‘Install’
4. Running a simple Hello World C++ program
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World";
return 0;
}
- Click ‘Run Build Task’ from Terminal menu (or) Run C/C++ file icon on the bar.
- Choose ‘C/C++, g++.exe build and debug active file’
- Click ‘Run C/C++ file’ icon on the bar
(or)
- From a new VS Code Integrated Terminal, you can now run your program by typing ".\
helloworld".