vscode namespace "std" has no member "string"C/C++(135) 제거

2024. 8. 13. 09:49Env/Tools

    목차
반응형

vscode에서 std::string val; 등에서 string 밑에 적색으로 밑줄이 그어져서 경고를 표시하는 경우가 있습니다. 

경고 메시지는 namespace "std" has no member "string"C/C++(135) 입니다. 

 

이런 불필요한 경고를 제거하려면, .vscode 폴더 밑에 위치한 settings.json 파일을 다음과 같이 수정합니다. 

 

{
    "files.associations": {
        "*.cc": "cpp",
        "string": "cpp",
        "__bit_reference": "cpp",
        "__bits": "cpp",
        "__config": "cpp",
        "__debug": "cpp",
        "__errc": "cpp",
        "__hash_table": "cpp",
        "__locale": "cpp",
        "__mutex_base": "cpp",
        "__node_handle": "cpp",
        "__nullptr": "cpp",
        "__split_buffer": "cpp",
        "__string": "cpp",
        "__threading_support": "cpp",
        "__tree": "cpp",
        "__tuple": "cpp",
        "any": "cpp",
        "array": "cpp",
        "atomic": "cpp",
        "bit": "cpp",
        "bitset": "cpp",
        "cctype": "cpp",
        "charconv": "cpp",
        "chrono": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "codecvt": "cpp",
        "compare": "cpp",
        "complex": "cpp",
        "concepts": "cpp",
        "condition_variable": "cpp",
        "csetjmp": "cpp",
        "csignal": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "ctime": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "deque": "cpp",
        "exception": "cpp",
        "coroutine": "cpp",
        "format": "cpp",
        "forward_list": "cpp",
        "fstream": "cpp",
        "future": "cpp",
        "initializer_list": "cpp",
        "iomanip": "cpp",
        "ios": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "istream": "cpp",
        "limits": "cpp",
        "list": "cpp",
        "locale": "cpp",
        "map": "cpp",
        "memory": "cpp",
        "mutex": "cpp",
        "new": "cpp",
        "numeric": "cpp",
        "optional": "cpp",
        "ostream": "cpp",
        "queue": "cpp",
        "random": "cpp",
        "ranges": "cpp",
        "ratio": "cpp",
        "regex": "cpp",
        "scoped_allocator": "cpp",
        "set": "cpp",
        "span": "cpp",
        "sstream": "cpp",
        "stack": "cpp",
        "stdexcept": "cpp",
        "streambuf": "cpp",
        "string_view": "cpp",
        "strstream": "cpp",
        "system_error": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "typeindex": "cpp",
        "typeinfo": "cpp",
        "unordered_map": "cpp",
        "unordered_set": "cpp",
        "valarray": "cpp",
        "variant": "cpp",
        "vector": "cpp",
        "algorithm": "cpp",
        "*.ipp": "cpp",
        "filesystem": "cpp",
        "memory_resource": "cpp",
        "thread": "cpp",
        "__verbose_abort": "cpp",
        "functional": "cpp",
        "iterator": "cpp",
        "__memory": "cpp",
        "__availability": "cpp",
        "shared_mutex": "cpp",
        "utility": "cpp",
        "quantize.c": "cpp",
        "*.tcc": "cpp",
        "rope": "cpp",
        "slist": "cpp",
        "cfenv": "cpp",
        "cinttypes": "cpp",
        "*.txt": "cpp"
    },
    "cmake.sourceDirectory": "${workspaceFolder}/build",
    "C_Cpp.errorSquiggles": "disabled"
}
반응형