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 →C2039: Der Header, der ihn deklariert, ist nicht eingebunden.
std::filesystem needs , std::optional needs : include the header of what you use.
C2039: Der Member gehört zu einer anderen Klasse.
Check the expression's static type. A base-class reference does not expose a member declared only by a derived class. Access through a pointer uses -> , but incorrect pointer syntax can produce a different diagnostic.
C2039: Der Membername ist falsch geschrieben.
Check the spelling and the case, for example push_back .
C2039: Der Member erfordert einen neueren C++-Standard.
std::filesystem needs C++17, starts_with C++20: set C/C++ > Language > C++ Language Standard .
C2061: Ein abhängiger Typ in einer Vorlage hat kein typename .
Write typename T::value_type : inside a template, a name that depends on a template parameter is not a type unless you say so.
C2061: Der Typ ist an dieser Stelle noch nicht deklariert.
Include its header before the declaration, or qualify it with its namespace, for example std::string .
C2061: Zwei Header binden sich gegenseitig ein.
With a circular include, the type is not declared yet. Forward-declare it ( class Widget; ) when the function takes a pointer or a reference, and include the header in the .cpp file.
C2065: Der Code steht vor dem vorkompilierten Header.
With precompiled headers, everything before #include "pch.h" is ignored. Make it the first line of the file.
C2065: Die Deklaration wird vom Präprozessor ausgeschlossen.
Check the #if or #ifdef around it and the preprocessor definitions of the configuration.
C2065: Die Deklaration befindet sich in einem anderen Gültigkeitsbereich oder folgt erst später.
Eine innerhalb eines Blocks oder einer Schleife deklarierte Variable existiert danach nicht mehr, und ein Name muss vor seiner ersten Verwendung deklariert werden.
C2065: Der Header, der ihn deklariert, ist nicht eingebunden.
Binden Sie ihn in die Datei ein, die den Namen verwendet, statt sich darauf zu verlassen, dass ein anderer Header ihn einbindet.
C2065: Der Name ist falsch geschrieben.
C++ is case-sensitive: Count and count are different names.
C2065: Der Name befindet sich in einem Namespace.
Write std::cout , or add a using declaration.
C2084: Eine .cpp-Datei wird eingebunden.
Include headers, never .cpp files.
C2084: Eine Funktion wird in der Klasse und wieder außerhalb definiert.
Keep one definition: either the body in the class, or a declaration in the class and the body in the .cpp file.
C2084: Ein Header, der Funktionen definiert, hat keinen Include-Guard.
Add #pragma once to the header.
C2143: Eine Klassen- oder Strukturdefinition endet nicht mit ; .
Write }; after the closing brace. The error then appears on the first line after the class, often in another file that includes the header.
C2143: Ein Typname ist unbekannt.
In Widget* widget; , if Widget is not declared, the compiler reads it as a variable and expects ; before * . Include its header, qualify it with its namespace, or forward-declare it ( class Widget; ).
C2143: Die vorherige Anweisung ist noch nicht abgeschlossen.
Look at the line before the one reported: a missing ; , an unclosed parenthesis, or a macro that expands to something unexpected.
C2143: Zwei Header binden sich gegenseitig ein.
Eine der beiden Klassen ist noch nicht deklariert, wenn die andere sie verwendet. Ersetzen Sie ein Include durch eine Vorwärtsdeklaration, wo ein Zeiger oder eine Referenz ausreicht.