一.配置C++
用Visio stduio编写程序确实很舒服,但是有些很小的程序,甚至像A两个PTA的题也要用到就觉得很大材小用,用Dev c++,总觉得很难用,当然主要是很难看,所以依靠强大的百度配置了一下
launch.json
- {
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- “version”: “0.2.0”,
- “configurations”: [
- {
- “name”: “(gdb) Launch”,
- “preLaunchTask”: “build”,
- “type”: “cppdbg”,
- “request”: “launch”,
- “program”: “${fileDirname}/${fileBasenameNoExtension}.exe”,
- “args”: [],
- “stopAtEntry”: false,
- “cwd”: “${workspaceFolder}”,
- “environment”: [],
- “externalConsole”: true,
- “MIMode”: “gdb”,
- “miDebuggerPath”: “D:/MinGW/bin/gdb.exe”,
- “setupCommands”: [
- {
- “description”: “Enable pretty-printing for gdb”,
- “text”: “-enable-pretty-printing”,
- “ignoreFailures”: true
- }
- ]
- }
- ]
- }
tasks.json
- {
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- “version”: “2.0.0”,
- “tasks”: [
- {
- “label”: “build”,
- “type”: “shell”,
- “group”: {
- “kind”: “build”,
- “isDefault”: true
- },
- “presentation”: {
- “echo”: true,
- “reveal”: “always”,
- “focus”: false,
- “panel”: “shared”
- },
- “windows”: {
- “command”: “g++”,
- “args”: [
- “-ggdb”,
- “\”${file}\””,
- “–std=c++11”,
- “-o”,
- “\”${fileDirname}\\${fileBasenameNoExtension}.exe\””
- ]
- }
- }
- ]
- }