C++ / Búsqueda de documentación
Encuentre el error. Encuentre el siguiente paso.
Busque por código de diagnóstico, mensaje copiado o síntoma. Filtre por contenido y sistema de proyecto.
176 resultados
Examinar documentación →C2039: No se incluye el encabezado que lo declara.
std::filesystem needs , std::optional needs : include the header of what you use.
C2039: El miembro pertenece a otra clase.
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: El nombre del miembro está mal escrito.
Check the spelling and the case, for example push_back .
C2039: El miembro necesita un estándar de C++ más reciente.
std::filesystem needs C++17, starts_with C++20: set C/C++ > Language > C++ Language Standard .
C2061: un tipo dependiente en una plantilla no tiene 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: El tipo no está declarado en ese punto.
Include its header before the declaration, or qualify it with its namespace, for example std::string .
C2061: Dos encabezados se incluyen entre sí.
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: El código aparece antes del encabezado precompilado.
With precompiled headers, everything before #include "pch.h" is ignored. Make it the first line of the file.
C2065: El preprocesador excluye la declaración.
Check the #if or #ifdef around it and the preprocessor definitions of the configuration.
C2065: La declaración está en otro ámbito o aparece después.
Una variable declarada dentro de un bloque o un bucle no existe después de él, y un nombre debe declararse antes de su primer uso.
C2065: No se incluye el encabezado que lo declara.
Inclúyalo en el archivo que usa el nombre, en lugar de depender de otro encabezado para incluirlo.
C2065: El nombre está mal escrito.
C++ is case-sensitive: Count and count are different names.
C2065: El nombre está en un espacio de nombres.
Write std::cout , or add a using declaration.
C2084: Se incluye un archivo .cpp.
Include headers, never .cpp files.
C2084: Una función se define en la clase y de nuevo fuera de ella.
Keep one definition: either the body in the class, or a declaration in the class and the body in the .cpp file.
C2084: Un encabezado que define funciones no tiene protección de inclusión.
Add #pragma once to the header.
C2143: Una definición de clase o estructura no termina en ; .
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: Se desconoce el nombre de un tipo.
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: La instrucción anterior no está terminada.
Look at the line before the one reported: a missing ; , an unclosed parenthesis, or a macro that expands to something unexpected.
C2143: Dos encabezados se incluyen entre sí.
Una de las dos clases aún no está declarada cuando la otra la usa. Sustituya una inclusión por una declaración adelantada donde baste un puntero o una referencia.