How to Set Up C++ in Visual Studio Code - Download & Install C++ & C in VSCode

  Рет қаралды 2,528

GameTrick

GameTrick

4 ай бұрын

VSCode Link:- code.visualstudio.com/
C++ Install Link:- code.visualstudio.com/docs/cp...
MSYS2 Command :- pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
Environment Variable Path:- C:\msys64\ucrt64\bin
VSCode Compiler Path:- C:\\msys64\\ucrt64\\bin\\g++.exe
1. Open Your Browser
2. Type "Visual Studio Code" in Google
3. Click First Link:- code.visualstudio.com/
4. Click Download Button
5. This Will Automatically Start Downloading. if it Does not Start Then Click "direct download link"
6. Wait For Download to Finish
7. Click To Install VSCode
8. Now Follow The Installation Process As Shown in This Video
9. Now Click C++ This WIl Expand C++ Menu
10. Now Click on "GCC on Windows" Link:- code.visualstudio.com/docs/cp...
11. Now Scroll Down Until You Find "direct link to the installer"
12. Click "direct link to the installer"
13. Wait For Download To Start
14. Wait For Download To Finish
15. Click To Install MSYS2
16. Click Next Button
17. Click Next Button
18. Click Next Button
19. Wait For Installation Process To Finish
20. Click Finish Button
21. This Will Open MSYS2 if MSYS2 Does not Open Automatically Then Follow Next Step
22. if MSYS2 Does not Open Automatically Then Search "MSYS2 MSYS"
23. Click "MSYS2 MSYS"
24. Now Go Back To VSCode Page & Copy Command
25. Go Back To MSYS2
26. Right-Click in MSYS2 & Click Paste To Paste The Command & Hit Enter on Your Keyboard
27. Hit Enter on Your Keyboard When You See Something Like This
28. Now Type Y & Hit Enter on Your Keyboard
29. Now Wait For Downloading & Installation Proesss To Finish
30. Now Close MSYS2
31. Scroll Down Until You Find Path As Shown in The Video
32. Copy This Path
33. Search "edit the system environment variables"
34. Click "Edit the system environment variables"
35. Click "Environment Variables" Button
36. Click Path & Then Click Edit Button
37. Click New Button
38. Now Paste The Path Which We Previously Copied
39. Click OK Button
40. If There is no Path in the List Then You can Create By Clicking New Button
41. Type Variable name as Path & in Variable Value Type Your Path You Have Copied
42. Click OK Button (Only Do This if There is no Path in The list Else Skip This Step)
43. Click OK Button
44. Click OK Button
45. Now Search cmd
46. Click Command Prompt
47. Go Back to the VSCode Website, & Copy the Following Code One by One: gcc --version, g++ --version, & gdb --version. Then, Paste Each of Them Into the Command Prompt & Hit Enter on Your Keyboard. This Code Ensures That C++ is Successfully Installed on Your Computer (Codes in Description)
48. Close Command Prompt
49. Minimize Your Browser
50. Open Visual Studio Code
51. Click Extensions iCon
52. Type C++ & Hit Enter on Your Keyboard
53. Click "C/C++ Extension Pack"
54. Click Install Button
55. Close C/C++ Extension Pack Tab
56. Close VSCode
57. Again Open VSCode
58. Click File
59. Click "New Text File"
60. Click "Select a Language"
61. Click "C++ (cpp)" or "C (C)" Depend on Your Prefered Language
62. Now Type You C++ or C Code
63. Click File
64. Click Save
65. Go To Location Where You Want to Save Your C++ or C File & Then Type Your File Name
66. Ensure That C++ or C is Selected as "Save as type"
67. Click Save Button
68. Try to Run the Code. If There is Any Error in the Include, Then Continue Watching This Video. It Will Show How to Fix It
69. Now Click on The Compiler That Contains "C:\msys64\ucrt64\bin\g++.exe"
70. Code is Running Now I Will Show How To Fix Include Error
71. Here is The include Error That You Might Face To Fix This Error Follow The Steps
72. Click Extensions iCon
73. Type C++ & Hit Enter on Your Keyboard
74. This Time Click C/C++ instead of C/C++ Extension Pack
75. Click Settings iCon
76. Click "Extension Settings"
77. Now Leave Blank Space Beside @ext:ms-vscode.cpptools & Type Comiler Path
78. Ensure That "C_Cpp › Default: Include Path", "C_Cpp › Default: System Include Path" & "C_Cpp › Default: Compiler Args" Has No Value If There are Any Values You Can Reset it
79. To Reset Just Hover Your Mouse Over "C_Cpp › Default: Include Path", "C_Cpp › Default: System Include Path" & "C_Cpp › Default: Compiler Args"
80. Then Click The Settings
81. Click Reset setting
82. Do Same With Other Two if There are Any Values Reset Them As We Did Previously
83. Now Click "Edit in settings.json" Under "C_Cpp › Default: Compiler Path"
84. Go Back To Your Browser & Again Copy The Same Path We Copied Previously From VSCode Website
85. Again Copy The Path We Copied Previously
86. Go Back To Visual Studio Code
87. Now Paste The Path Beside "C_Cpp.default.compilerPath" As Shown in This Video
88. Now Change All Single Backslash To Double As Shown in Video
89. After bin Add Double Backslash & Then Type g++.exe
90. Click File
91. Click Save
92. Now Go Back To Your Code File to Check if Error is Fixed or not
93. Error is Fixed Now Run The Code
94. Now Click on The Compiler That Contains "C:\msys64\ucrt64\bin\g++.exe"
95. Done

Пікірлер
Setup VS Code with C++ On Windows 11 (or 10)
7:12
KNuggies
Рет қаралды 15 М.
How To Fix Include Errors in C++
9:14
The Cherno
Рет қаралды 82 М.
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 101 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 21 МЛН
Iron Chin ✅ Isaih made this look too easy
00:13
Power Slap
Рет қаралды 36 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 58 МЛН
Getting Started with C# & .NET in VS Code (Official Beginner Guide)
9:50
Visual Studio Code
Рет қаралды 17 М.
How to set up C++ in Visual Studio Code
6:53
Kenny Yip Coding
Рет қаралды 581 М.
Run C++ and C in Visual Studio Code | Mac and Windows!
10:56
Caleb Curry
Рет қаралды 87 М.
20 Essential VS Code Extensions In 2024
14:26
Traversy Media
Рет қаралды 151 М.
How to Set up Visual Studio Code for C and C++ Programming
7:22
LearningLad
Рет қаралды 3,9 МЛН
How to Set up Visual Studio Code for C and C++ Programming
5:44
Code Bear
Рет қаралды 1,5 МЛН
Istanbul havuz keyfi #filizkemal
0:25
Filiz Kemal
Рет қаралды 24 МЛН
Funny Fails 🤭🤭🤣 #failsvideo #shortsfails #funnyfails  #fails .
0:52
Giant balloon🤪 Subscribe to me👋🏻
0:27
Nazar S
Рет қаралды 9 МЛН
Are you competing for excitement or excitement and humor? Shoot as you please. Don't follow the
0:56
Small Act of Kindness is also a charity
1:00
PainCare _Trust
Рет қаралды 48 МЛН
САКЕНДІ ҚАТЫНЫ ҚЫЗҒАНЫП ҚАЛДЫ
0:31
Ән - көңілдің ажары.
Рет қаралды 243 М.