Hello Everyone
As you know we have already learned the basics of c++ in our previous posts. The first tutorial on my account was C++ its because when you are completely new to programming it is recommended to learn a high-level language like c/c. When you know these languages it is easy for you to switch languages. In previous tutorials, we used Dev C because we were not able to run our script on the VS code. SO in this post, I am going to fix the problem. We are going to configure the Visual Studio Code for C++. To compile our code on VS code we need to install few things and configure our setting a little bit so without wasting time let's get started.
First of all, let me show you what errors we are getting while compiling our c++ code on the Visual Studio Code.
I have a simple Hello World code on the VS code. But when I run it
It is tell me that 'g++' is not recognized as an internal or external command, operable program or batch file. Plus it has some problems as well.
We are going to fix them in this post. So follow my steps and in the end, we will able to compile our code on the Visual studio code
gcc --versionIn my case, I don't have installed.
click on the install then continue and it will start downloading the necessary files. Make sure you have working internet connection.
Once done downloading click on continue. On the next step select this option
Now we need to include the directory where the C++ compiler is located the environment variable.
Select the Path and click edit.
Click "New" paste thisC:\MinGW\bin and save it.
Let's check the version again
I think this much is enough for today. Now if you like the post please upvote and comment if you want to give me some advise