How to set up visual studio code for C and C++ programming 2023

how to set up visual studio code for c and c++ 2023

Download and install Visual Studio Code

Download MingW for C/C++

[ Setup .exe included for automated Environment setup ]

Steps for Installation

1. Unzip Mingwx64_codesempai.zip
2. Do not unzip mingw-w64.zip
3. Double-click on Env_Installer.exe
4. Wait for 70sec (approx unzipping time)
5. Restart Your Windows
6. Try running Code, in Visual Studio Code!
7. Happy Coding!
If the automated process of adding the MinGW path to the environment and the Python path as described above does not work, it is recommended to try the traditional method. Here is a refined version of this statement:
If the automated setup process for adding the MinGW path is not successful, please follow these steps to manually add the path using the traditional method:

1. Open the Start menu and search for "Environment Variables".
2. Click on "Edit the system environment variables".
3. In the System Properties window, click on the "Environment Variables" button.
4. Under "System Variables", scroll down and find the "Path" variable.
5. Click on "Edit" and add the path of MinGW (e.g., "C:\MinGW\bin").
6. Click OK on all open windows to save the changes.
7. Open a new command prompt or terminal window to verify that the MinGW path is recognized by the system.

By following these steps, you should be able to manually add the MinGW path to the environment variables and ensure that it is recognized by the system.

Run Hello World in C

After installation try to run hello world 
  1. #include <stdio.h>
  2. int main() {
  3. // printf() displays the string inside quotation
  4. printf("Hello, World!");
  5. return 0;
  6. }

Run Hello World in C++

  1. #include <iostream>

  2. int main() {
  3. // Write C++ code here
  4. std::cout << "Hello world!";

  5. return 0;
  6. }

#Optional ( If you see this message! File is Safe! to install ) 




# Please comment if this does not work!

Post a Comment

If you have any doubts, please let me know

Previous Post Next Post