CppPilot

C++ / Recherche dans la documentation

Trouver l’erreur. Trouver la prochaine étape.

Recherchez par code de diagnostic, message copié ou symptôme. Filtrez par contenu et système de projet.

  1. Exemples et schémasMSBuild + CMake

    C2039 : l’en-tête qui le déclare n’est pas inclus.

    std::filesystem needs , std::optional needs : include the header of what you use.

  2. Exemples et schémasMSBuild + CMake

    C2039 : le membre appartient à une autre classe.

    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.

  3. Exemples et schémasMSBuild + CMake

    C2039 : le nom du membre est mal orthographié.

    Check the spelling and the case, for example push_back .

  4. Exemples et schémasMSBuild + CMake

    C2039 : le membre exige une norme C++ plus récente.

    std::filesystem needs C++17, starts_with C++20: set C/C++ > Language > C++ Language Standard .

  5. Exemples et schémasMSBuild + CMake

    C2061 : un type dépendant dans un modèle n’a pas de 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.

  6. Exemples et schémasMSBuild + CMake

    C2061 : le type n’est pas déclaré à cet endroit.

    Include its header before the declaration, or qualify it with its namespace, for example std::string .

  7. Exemples et schémasMSBuild + CMake

    C2061 : deux en-têtes s’incluent mutuellement.

    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.

  8. Exemples et schémasMSBuild + CMake

    C2065 : du code précède l’en-tête précompilé.

    With precompiled headers, everything before #include "pch.h" is ignored. Make it the first line of the file.

  9. Exemples et schémasMSBuild + CMake

    C2065 : la déclaration est exclue par le préprocesseur.

    Check the #if or #ifdef around it and the preprocessor definitions of the configuration.

  10. Exemples et schémasMSBuild + CMake

    C2065 : la déclaration appartient à une autre portée ou apparaît plus loin.

    Une variable déclarée dans un bloc ou une boucle n’existe plus après celui-ci ; un nom doit être déclaré avant sa première utilisation.

  11. Exemples et schémasMSBuild + CMake

    C2065 : l’en-tête qui le déclare n’est pas inclus.

    Incluez-le dans le fichier qui utilise le nom au lieu de compter sur son inclusion par un autre en-tête.

  12. Exemples et schémasMSBuild + CMake

    C2065 : le nom est mal orthographié.

    C++ is case-sensitive: Count and count are different names.

  13. Exemples et schémasMSBuild + CMake

    C2065 : le nom appartient à un espace de noms.

    Write std::cout , or add a using declaration.

  14. Exemples et schémasMSBuild + CMake

    C2084 : un fichier .cpp est inclus.

    Include headers, never .cpp files.

  15. Exemples et schémasMSBuild + CMake

    C2084 : une fonction est définie dans la classe puis à nouveau à l’extérieur.

    Keep one definition: either the body in the class, or a declaration in the class and the body in the .cpp file.

  16. Exemples et schémasMSBuild + CMake

    C2084 : un en-tête définissant des fonctions n’a pas de garde d’inclusion.

    Add #pragma once to the header.

  17. Exemples et schémasMSBuild + CMake

    C2143 : une définition de classe ou de structure ne se termine pas par un point-virgule.

    Write }; after the closing brace. The error then appears on the first line after the class, often in another file that includes the header.

  18. Exemples et schémasMSBuild + CMake

    C2143 : un nom de type est inconnu.

    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; ).

  19. Exemples et schémasMSBuild + CMake

    C2143 : l’instruction précédente n’est pas terminée.

    Look at the line before the one reported: a missing ; , an unclosed parenthesis, or a macro that expands to something unexpected.

  20. Exemples et schémasMSBuild + CMake

    C2143 : deux en-têtes s’incluent mutuellement.

    L’une des classes n’est pas encore déclarée lorsque l’autre l’utilise. Remplacez une inclusion par une déclaration anticipée lorsqu’un pointeur ou une référence suffit.