How to Setup C++ in Visual Studio Code | Install MinGW Compiler & VSCode and run C++ Programs

10 Просмотры
Издатель
How to set up C++ with Visual Studio Code (vscode).

Install Visual Studio Code: https://code.visualstudio.com/

Install minGW (C++ Compiler): https://code.visualstudio.com/docs/cp...

Steps to setup minGW in windows:
1. Install MSYS2 using the link provided by microsoft https://github.com/msys2/msys2-instal...

2. Open MSYS2, enter the follow command:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain

3. Hit Enter for default selection, then type Y and hit Enter to proceed with the installation.

4. In your search bar, look for edit Environment Variables and open the setting. In the window bottom right, click Environment Variables. Click on Path in your list of User Variables. Click edit, new, add the following:

C:\msys64\ucrt64\bin

5. In your seach bar, look for Command Prompt and open it. Type in gcc --version, g++ --version, and gdb -- version. You should see minGW setup correctly.

Open vscode, and in extensions, look for C/C++ Extension Pack and install it. Then, create a new text file. Name it whatever you want, but be sure to include the .cpp extension.

Ex) Create a file named test.cpp and add some starter code. (include iostream, using namespace std, int main() ... cout "Hello World!")

On the top right, click on the play button to run your program. Select Run C/C++ File. You should now see your output display in the built-in terminal of VS Code!

And, there you have it! How to setup C++ for Visual Studio Code!

Download and Install Mingw
https://youtu.be/1jdYtBWaF5o

Download and Install Visual Studio Code
https://youtu.be/2qYqmP6lblo

Download and Install Python
https://youtu.be/psF0T_7doPk

Learn Python: Full Course
https://youtu.be/PU4nUWLaGXY

---------------------------------------------------------------------------
CONNECT WITH ME ON:
* Facebook: https://www.facebook.com/profile.php?id=100075588566198
* LinkedIn: www.linkedin.com/in/abdulkerim-Endris
* Twitter: https://twitter.com/kerimacademy
* GitHub: : https://github.com/kerim2022
* YouTube channel: https://youtube.com/@kerimacademy122
* Telegram: https://t.me/kerim_academy_tips
---------------------------------------------------------------------------
Категория
Язык программирования C++
Комментариев нет.