竞赛vscode配置指南

2023-07-08 14:19:13 浏览数 (2)

将下面内容填充到setting.json

为使目录变的简洁,编译生成的.exe文件均会被命名为a.exe,如果有新编译的程序,则会自动替换掉原来的。这样文件夹中就不会乱糟糟的了

如果你不想要这个效果,可以修改第76行

代码语言:javascript复制
{
    "files.associations": {
        "ostream": "cpp",
        "*.tcc": "cpp",
        "atomic": "cpp",
        "bitset": "cpp",
        "chrono": "cpp",
        "complex": "cpp",
        "deque": "cpp",
        "forward_list": "cpp",
        "list": "cpp",
        "string": "cpp",
        "unordered_map": "cpp",
        "unordered_set": "cpp",
        "vector": "cpp",
        "iterator": "cpp",
        "memory_resource": "cpp",
        "optional": "cpp",
        "string_view": "cpp",
        "fstream": "cpp",
        "future": "cpp",
        "istream": "cpp",
        "scoped_allocator": "cpp",
        "shared_mutex": "cpp",
        "sstream": "cpp",
        "streambuf": "cpp",
        "system_error": "cpp",
        "thread": "cpp",
        "functional": "cpp",
        "regex": "cpp",
        "tuple": "cpp",
        "valarray": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "random": "cpp",
        "array": "cpp",
        "initializer_list": "cpp",
        "iomanip": "cpp",
        "cctype": "cpp",
        "cfenv": "cpp",
        "charconv": "cpp",
        "cinttypes": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "codecvt": "cpp",
        "condition_variable": "cpp",
        "csetjmp": "cpp",
        "csignal": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "ctime": "cpp",
        "cuchar": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "exception": "cpp",
        "algorithm": "cpp",
        "map": "cpp",
        "memory": "cpp",
        "numeric": "cpp",
        "ratio": "cpp",
        "set": "cpp",
        "type_traits": "cpp",
        "utility": "cpp",
        "limits": "cpp",
        "mutex": "cpp",
        "new": "cpp",
        "stdexcept": "cpp",
        "typeindex": "cpp",
        "typeinfo": "cpp"
    },
    "code-runner.executorMap": {
        "cpp": " cd $dir && g   $fileName -D LOCAL -o a.exe && .\a.exe", 
    },

}

2

点击在settings.json中编辑

将下面配置填入文件

注意其中第7行和第10行务必根据自己实际情况填写,如果严格跟随本教程,则直接复制即可

代码语言:javascript复制
{
    "explorer.confirmDelete": false,
    "debug.onTaskErrors": "showErrors",
    "explorer.confirmDragAndDrop": false,
    "code-runner.saveFileBeforeRun": true,
    "code-runner.runInTerminal": true,
    "C_Cpp.default.compilerPath": "C:\mingw64\bin\g  .exe",
    "C_Cpp.default.cppStandard": "c  14",
    "C_Cpp.default.includePath": [
        "C:\mingw64\lib"
    ],
    "C_Cpp.default.intelliSenseMode": "gcc-x64",
    "files.autoGuessEncoding": true,
    },
}

0 人点赞