C++ / Dokumentationssuche
Den Fehler finden. Den nächsten Schritt finden.
Suchen Sie nach Diagnosecode, kopierter Meldung oder Symptom. Filtern Sie nach Inhalt und Projektsystem.
176 Ergebnisse
Dokumentation durchsuchen →C1004: Ein Makro verbirgt eine geschweifte Klammer.
A macro that opens a block, such as BEGIN_MESSAGE_MAP , needs its closing macro.
C1004: Ein eingebundener Header lässt einen Block offen.
A header that ends inside a namespace or an extern "C" { moves the error to the file that includes it: check the headers included last.
C1010: Die Datei bindet den vorkompilierten Header nicht ein.
Add #include "pch.h" , or stdafx.h in older projects, as the first line of the file.
C1010: Die Datei sollte es nicht verwenden.
For C files and third-party sources, set C/C++ > Precompiled Headers > Precompiled Header to Not Using Precompiled Headers in that file's properties.
C1010: Der Name stimmt nicht mit der Einstellung überein.
The include must name the file set in Precompiled Header File , exactly.
C1083: Eine Abhängigkeit oder ein SDK ist nicht installiert.
Installieren Sie für Windows- oder Standard-Header das Windows SDK oder die C++-Workload im Visual Studio Installer; eine Bibliothek stellen Sie wieder her, zum Beispiel mit vcpkg.
C1083: Es ist für eine andere Konfiguration oder Plattform festgelegt.
Settings made for Debug or Win32 only do not apply to Release or x64: select All Configurations and All Platforms when you add the directory.
C1083: Sein Ordner ist kein Include-Verzeichnis.
Add it to C/C++ > General > Additional Include Directories , relative to the project with $(ProjectDir) or $(SolutionDir) rather than as an absolute path.
C1083: Bei Anführungszeichen und spitzen Klammern wird unterschiedlich gesucht.
#include "file.h" looks first next to the including file; only in the include directories.
C1083: Der Pfad in der Direktive ist falsch.
Check the folder names in #include "lib/file.h" against the directory you added.
C2001: Ein Pfad endet mit einem Backslash.
In "C:\Data\" , \" is an escaped quote. Double the backslashes, or write a raw string: R"(C:\Data\)" .
C2001: Das schließende Anführungszeichen fehlt.
Schließen Sie die Zeichenfolge in derselben Zeile. Um eine lange Zeichenfolge fortzusetzen, schließen Sie sie und öffnen Sie eine weitere in der nächsten Zeile: Benachbarte Literale werden verbunden.
C2001: Die Datei ist UTF-8 und enthält Nicht-ASCII-Zeichen.
Without a BOM, MSVC reads the file in the system code page, and on Chinese, Japanese, or Korean Windows a multi-byte character can absorb the closing quote. Add /utf-8 to C/C++ > Command Line > Additional Options , or save the file as UTF-8…
C2011: windows.h wird vor winsock2.h eingebunden.
windows.h includes the old winsock.h , which redefines sockaddr : include winsock2.h first, or define WIN32_LEAN_AND_MEAN before windows.h .
C2011: Ein Header hat keinen Include-Guard.
Add #pragma once at the top of the header, so that including it twice defines its types once.
C2011: Zwei Header definieren denselben Typ.
Behalten Sie eine einzige Definition in einem Header und binden Sie diesen Header im anderen ein.
C2027: Ein std::unique_ptr-Member verweist auf einen unvollständigen Typ.
With the pimpl idiom, the destructor must be defined where the type is complete: declare ~Owner(); in the header and define Owner::~Owner() = default; in the .cpp file, after the include.
C2027: Eine Klasse enthält ein Objekt ihres eigenen Typs.
A class cannot contain itself by value: use a pointer or a container such as std::vector .
C2027: Der Code verwendet einen Member einer vorab deklarierten Klasse.
Include the header that defines the class in the .cpp file that calls its members, creates it, or copies it.
C2027: Zwei Header binden sich gegenseitig ein.
Keep the forward declaration in one header, move the code that uses the members to the .cpp file, and include the full header there.