直接运行
https://zhuanlan.zhihu.com/p/103308900
调试
//cpp_.... { "configurations": [ { "name": "Mac", "includePath": ["${workspaceFolder}/**"], "defines": [], "macFrameworkPath": [ "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" ], "compilerPath": "/usr/bin/clang", "cStandard": "c11", "cppStandard": "c++17", "intelliSenseMode": "clang-x64" } ], "version": 4 } // launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "C/C++: clang++ build and debug active file", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/${fileBasenameNoExtension}", "args": [], "stopAtEntry": true, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "lldb", "preLaunchTask": "C/C++: clang++ build active file" } ] } // task.json { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "type": "shell", "label": "C/C++: clang++ build active file", "command": "/usr/bin/clang++", "args": [ "-std=c++17", "-stdlib=libc++", "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}" ], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": ["$gcc"], "group": { "kind": "build", "isDefault": true }, "detail": "Task generated by Debugger." } ] }
- configuration vscode cpp Mac forconfiguration vscode cpp mac cpp-project-calc-for-average mysql configuration information for ubuntu init for cpp application line configuration for variant configuration for currently vscode问题cpp demoapplication line configuration for beginners tutorials cpp for configure for packages distro