一.配置C++

用Visio stduio编写程序确实很舒服,但是有些很小的程序,甚至像A两个PTA的题也要用到就觉得很大材小用,用Dev c++,总觉得很难用,当然主要是很难看,所以依靠强大的百度配置了一下

launch.json

  1. {
  2.     // 使用 IntelliSense 了解相关属性。 
  3.     // 悬停以查看现有属性的描述。
  4.     // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  5.     “version”“0.2.0”,
  6.     “configurations”: [
  7.         {
  8.             “name”“(gdb) Launch”,
  9.             “preLaunchTask”“build”,
  10.             “type”“cppdbg”,
  11.             “request”“launch”,
  12.             “program”“${fileDirname}/${fileBasenameNoExtension}.exe”,
  13.             “args”: [],
  14.             “stopAtEntry”false,
  15.             “cwd”“${workspaceFolder}”,
  16.             “environment”: [],
  17.             “externalConsole”true,
  18.             “MIMode”“gdb”,
  19.             “miDebuggerPath”“D:/MinGW/bin/gdb.exe”,
  20.             “setupCommands”: [
  21.                 {
  22.                     “description”“Enable pretty-printing for gdb”,
  23.                     “text”“-enable-pretty-printing”,
  24.                     “ignoreFailures”true
  25.                 }
  26.             ]
  27.         }
  28.     ]
  29. }

tasks.json

  1. {
  2.     // See https://go.microsoft.com/fwlink/?LinkId=733558
  3.     // for the documentation about the tasks.json format
  4.     “version”“2.0.0”,
  5.     “tasks”: [
  6.         {
  7.             “label”“build”,
  8.             “type”“shell”,
  9.             “group”: {
  10.                 “kind”“build”,
  11.                 “isDefault”true
  12.             },
  13.             “presentation”: {
  14.                 “echo”true,
  15.                 “reveal”“always”,
  16.                 “focus”false,
  17.                 “panel”“shared”
  18.             },
  19.             “windows”: {
  20.                 “command”“g++”,
  21.                 “args”: [
  22.                     “-ggdb”,
  23.                     “\”${file}\””,
  24.                     “–std=c++11”,
  25.                     “-o”,
  26.                     “\”${fileDirname}\\${fileBasenameNoExtension}.exe\””
  27.                 ]
  28.             }
  29.         }
  30.     ]
  31. }