In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces vscode to create a C language project example, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
1. Download the plug-ins Cmax Candle + and C++ Intellisense.
2. Create a new empty folder and open it from VSCode. (or File-- > Open Folder-- > create an empty folder)
3. Press F5 (use the command line gcc or make; to write a makefile file, and select C++ (GDB/LLDB) to generate launch.json (for debugging).
4. Modify the launch.json to set the
"program": "enter program name, for example ${workspaceFolder} / a.out"
Change to
"program": "${workspaceFolder} / ProjectName"; "externalConsole": true
Indicates that the output will be on the pop-up command line. If you change it to false, the output will be terminal inside VSCode.
5. Ctrl+Shift+B, select tasks.json-- > template-- > other to generate tasks.json (create task)
6. Modify tasks.json
"command": "echo Hello"
Change to
"command": "Gmail +-o ProjectName ProjectName.cpp"
The ProjectName here has the same name as the ProjectName in 5
7. For complex projects, "command": "echo Hello" is changed to "command": "make"
8. Create the makefile file and edit it
9. Write Hello.cpp files
10. Press Ctrl+Shift+P, select Task:Run Tasks, and execute the task
11. Press F5 to execute
The source code is as follows:
Hello.cpp
# include using namespace std;int main () {cout
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.