C++ / Documentation search
Find the error. Find the next step.
Search by diagnostic code, copied message, or symptom. Filter by content and project system.
205 results
Browse documentation →Analyze a crash dump in Visual Studio
Create a .dmp file when a C++ program crashes, open it in Visual Studio with the right symbols, and read the exception and call stack.
Precompiled headers in Visual Studio
How to set up a precompiled header (pch.h, /Yc and /Yu) in a Visual Studio C++ project, what to put in it, and how to fix its errors.
Speed up C++ builds in Visual Studio
Make MSVC builds faster: measure them, compile in parallel with /MP, use precompiled headers, include less, and link faster in Debug.
Upgrade an old C++ project to a newer Visual Studio
Move a C++ project from an older Visual Studio to Visual Studio 2022 or 2026: retarget the toolset and SDK, then fix the new errors.
Use vcpkg libraries in Visual Studio
Add C++ libraries to a Visual Studio project with vcpkg in manifest mode, choose the right triplet, and fix the errors it causes.
C1004: unexpected end-of-file found
Fix C1004 unexpected end-of-file in MSVC: unbalanced braces in a class, a namespace, or a header.
C1010: unexpected end of file while looking for precompiled header
Fix C1010 in Visual Studio: include the precompiled header first, or turn precompiled headers off for that file.
C1083: cannot open include file
Fix C1083 cannot open include file in Visual Studio: include directories, configurations, quotes, and missing SDKs.
C2001: newline in constant
Fix C2001 newline in constant in MSVC: unterminated strings, backslashes in paths, and UTF-8 source files without a BOM.
C2011: type redefinition
Fix C2011 type redefinition in MSVC: include guards, duplicate definitions, and winsock.h against winsock2.h.
C2027: use of undefined type
Fix C2027 use of undefined type in MSVC: forward declarations, incomplete types, circular includes, and unique_ptr members.
C2039: is not a member of
Fix C2039 is not a member of in MSVC: typos, missing headers, the C++ language standard, and members of another class.
C2061: syntax error: identifier
Fix C2061 syntax error identifier in MSVC: unknown types in parameter lists, circular includes, and typename in templates.
C2065: undeclared identifier
What C2065 undeclared identifier means in MSVC and how to fix typos, missing headers, namespaces, and precompiled header mistakes.
C2084: function already has a body
Fix C2084 function already has a body in MSVC: headers included twice, definitions in a class and outside it, and .cpp includes.
C2143: syntax error: missing ';' before
Fix C2143 syntax error missing ';' in MSVC: unknown type names, a class without its closing semicolon, and circular includes.
C2259: cannot instantiate abstract class
Fix C2259 cannot instantiate abstract class in MSVC: pure virtual functions not overridden and signatures that do not match.
C2280: attempting to reference a deleted function
Fix C2280 attempting to reference a deleted function: copies of non-copyable types such as unique_ptr, mutex, and thread.
C2440: cannot convert
Fix C2440 cannot convert in MSVC: string literals, const pointers, void pointers, and enum class values.
C2512: no appropriate default constructor available
Fix C2512 no appropriate default constructor in MSVC: user constructors, members and base classes, and std::map operator[].