The specified symbol was given a value but was never used.
Recovery
Use the symbol or remove it.
The specified symbol is being used before it has been assigned a value. The value of the symbol is undefined.
Recovery
Define or initialize the symbol before using it.
Reference variables must be initialized.
Recovery
Initialize the reference variable or remove it.
The specified class or enum name must have been declared before this use of the name.
Recovery
Declare the class or enum name before you use it. Check the correct spelling of the name.
The specified character is not a valid character in a C++ program. The code point represents the ASCII value of the character displayed in hexadecimal format.
Recovery
Remove the character.
A class declared within a function must have all of its member functions defined inline, because the class will be out of scope before non-inline functions can be defined.
Recovery
Define the functions inline, or move the class definition out of the scope of the function.
The operation cannot be performed because the size of the specified type is not known.
Recovery
Ensure the size of the type is known before this expression.
The logical expression contains an assignment (=). An equality comparison (==) may have been intended.
Recovery
Change the operator or the expression.
The specified conversion from a wider to a narrower type may cause the loss of significant data.
Recovery
Remove the conversion from a wider to a narrower type.
Jumping past a declaration with an explicit or implicit initializer is not valid unless the declaration is in an inner block or unless the jump is from a point where the variable has already been initialized.
Recovery
Enclose the initialization in a block statement.
The compiler detected the base classes of a derived class have members with the same names. This will cause ambiguity when the member name is used. This is only an informational message because the declaration of a member with an ambiguous name in a derived class is not an error. The ambiguity is only flagged as an error if you use the ambiguous member name.
Recovery
Change one of the names, or always fully qualify the name.
The derived class made a reference to a member that is declared in more than one of its base classes and the compiler cannot determine which base class member to choose.
Recovery
Change one of the names, or always fully qualify the name.
There is more than one way to perform the specified conversion. This ambiguity may be caused by an overloaded function.
Recovery
Change or remove the conversion.
const and volatile are only significant for non-static member functions, since they are applied to the "this" pointer.
Recovery
Remove const and volatile from all static members.
Case values must be unique within each "switch" statement.
Recovery
Change or remove one of the duplicate case values. Check the braces if you have nested case statements.
An empty character literal has been specified. A string literal may have been intended.
Recovery
Remove the character literal, change it to a string literal, or give it a value.
A type defined in class scope has been given the scope of the enclosing function or file because of a compiler option.
Recovery
Ensure this is correct scope.
A derived class has inherited the same base class in more than one path and the compiler cannot determine which one to choose.
Recovery
Remove one of the inheritances.
An attempt is being made to convert a pointer to a derived class into a pointer to a private or protected base class.
Recovery
Remove the pointer conversion.
The flow of control in the program never allows the statement to be be reached.
Recovery
Ensure that the statement is accessible to the flow of control, or remove the statement.
Unions must not be declared with base classes, virtual functions, static data members, members with constructors, members with destructors, or members with class copying assignment operators.
Recovery
Remove any such members from the union declaration.
Unions cannot be used as base classes for other class declarations.
Recovery
Remove the union as a base class for other class declarations.
An automatic variable within a function is not accessible from local classes declared within the function.
Recovery
Remove the reference to the local variable, or move the variable to a different scope.
The value of an enumerator must be a constant expression that is promotable to a signed integer value.
Recovery
Reduce the value of the enumerator.
The option requires a path name to search but no path was found.
Recovery
Supply the name of a directory containing include files after the option.
The option requires the name of a macro to be defined or undefined, and no name was found.
Recovery
Add a macro name after the option.
The argument has been declared in a function but has not been set or used.
Recovery
Use the argument or remove it.
The specified symbol has been declared as a global symbol but has not been set or used.
Recovery
Use the symbol or remove it.
You cannot use default arguments in the friend functions of the local class.
Recovery
Remove the default initializers from the local friend function.
The condition to an if, for, or switch is constant and therefore, that condition will always hold.
Recovery
No response is necessary.
The compiler has detected a constant after the ! operator which may be a coding error.
Recovery
Remove the constant or ignore this message.
Using more than one character in a character constant (for example, 'ab') may not be portable across machines.
Recovery
Remove the extra character(s) or change the character constant to a string constant.
A pointer that points to a type with less strict alignment requirements is being assigned, cast, returned or passed as a parameter to a pointer that is a more strictly aligned type. This is a potential portability problem.
Recovery
Remove the pointer reference or change the alignment.
Casting a constant value to a pointer is not portable to other platforms.
Recovery
Remove the constant expression from the cast expression.
A constant is being assigned to a signed bit field that cannot represent the constant. Precision may be lost and the stored value will be incorrect.
Recovery
Increase the size of the bit field.
A constant is being assigned to a bit field, and because the bit field has a smaller size, the precision will be lost.
Recovery
Change the assignment expression.
Operands from two different enumerations are used in an operation.
Recovery
Ensure both operands are from the same enumeration.
An unsigned value is being compared to a negative number. The unsigned value will always compare greater than the negative number. This may be a programming error.
Recovery
Remove the comparison or change the type.
The comparison is either "unsigned >= 0", which is always true, or "unsigned < 0", which is always false.
Recovery
Remove or change the comparison.
The comparison is either "unsigned > 0" or "unsigned <= 0", and could be written as "unsigned != 0" or "unsigned == 0".
Recovery
Change the comparison.
The indicated function requires an argument of a particular type. However, the argument specified is of a different type than the type required.
Recovery
Ensure that the argument is of the correct type.
The operand of the "#line" directive must be an integer in the specified range.
Recovery
Ensure that the operand is in the specified range.
You cannot define a type in a type cast or a conversion function declaration.
Recovery
Move the definition to a new location, or remove it.
The name has a special meaning in a C++ program and cannot be referenced in this way.
Recovery
Remove the reference.
Recovery
Make the escape sequence small enough to fit the specified range.
A wide character constant can only contain one character. This error may be caused by a literal containing a multibyte character if the multibyte character compile option is not used.
Recovery
Make the wide character constant smaller.
Recovery
Make the character constant smaller.
A linkage specification may only be defined at file scope, that is, outside all functions and classes.
Recovery
Move the linkage specification or remove it.
If a default initializer is specified in an argument list, all following arguments must also have default initializers.
Recovery
Remove the default initializers, or provide them for the following arguments, or move the arguments to the end of the list.
You cannot take the address of a constructor, a destructor or a reference member.
Recovery
Remove the address operator (&) from the expression or remove the expression.
The compiler has generated a temporary variable. This variable will be destroyed automatically when it goes out of scope. This messages is generated for your information only, it does not necessarily indicate a problem with your program.
Recovery
Ensure that your program does not attempt to reference the temporary variable outside of its scope.
The compiler detected an error while writing to the specified file.
Recovery
Ensure the file name is correct and that the disk is ready to be written to.
The keyword has been specified more than once. Extra occurrences are ignored.
Recovery
Remove one of the duplicate qualifiers.
The specified operator cannot be overloaded using an operator function. The following operators cannot be overloaded :colon. . .* :colon. :colon. ? :colon.
Recovery
Remove the overloading declaration or definition.
The non-member operator function must have at least one argument which is of class or enum type.
Recovery
Add an argument of class or enum type.
The compiler detected an operator that is similar to the built-in one, and is providing additional information.
Recovery
Ensure this is the desired match.
Recovery
Change the expression used in the divisor.
An expression attempts to take the address of a bit-field, or to use the bit-field to initialize a reference variable or argument.
Recovery
Remove the expression causing the error.
Default initializers are not allowed within the declaration of an operator function or a template function.
Recovery
Remove the default initializers.
The specified base class or member cannot be constructed since it is not initialized in the constructor initializer list and its class has no default constructor.
Recovery
Specify a default constructor for the class or initialize it in the constructor initializer list.
To generate test coverage information, statements cannot start to the right of column 65536.
Recovery
Shorten the line.
There can be no more than 65536 statements (not source lines) in a module when test coverage information is to be generated.
Recovery
Reduce the number of statements.
A template class instantiation has a different number of template arguments than the template declaration.
Recovery
Ensure that the template class has the same number of declarations as the template declaration.
The member function is being called for a const or volatile object but the member function has not been declared with the const or volatile qualifier.
Recovery
Supply a version of the member function with the correct set of "const" and "volatile" qualifiers.
Possible extraneous semi-colon has been specified.
Recovery
Check for extra semi-colons in statement.
The bit-field is part of a conditional expression that is to be modified. Only objects that can have their address taken are allowed as part of such an expression, and you cannot take the address of a bit field.
Recovery
Remove the bit-field from the conditional expression.
The qualifier is being applied to a name or a type for which it is not valid.
Recovery
Remove the qualifier.
The type cannot be used as a function argument or in the instantiation of a template because the scope of the type is limited to the current function.
Recovery
Remove the local type.
If an exception specification is given in more than one declaration of a function, it must be the same in all such declarations.
Recovery
Ensure that all exception specifications match.
Default initializers have been given for non-type template arguments, but the template is not declaring a class.
Recovery
Remove the default initializers.
A function argument may be an expression of any object type. However, "void" is not the type of any object, and cannot be used as an argument type.
Recovery
Change the type of the function argument.
The compiler ran out of memory during compilation.
Recovery
End unnecessary processes and recompile.
You cannot create instances of abstract classes. An abstract class is a class that has or inherits at least one pure virtual function.
Recovery
Derive another object from the abstract class.
An abstract class must not be used as an argument type, as a function return type, or as the type of an explicit conversion.
Recovery
Derive another class from the abstract, instantiate it so it becomes a concrete object, and then use it instead.
A base class may only be specified once in the base class list for a derived class.
Recovery
Remove one of the specifications.
A non-type template argument must have a type that exactly matches the type of the corresponding argument in the template declaration.
Recovery
Ensure that the types match.
A non-type template argument must be a constant value or the address of an object, function, or static data member that has external linkage. String literals cannot be used as template arguments because they have no name, and therefore no linkage.
Recovery
Change the template argument.
At least one template argument must be specified in a template declaration.
Recovery
Specify a template argument in the declaration.
A non-type template argument must be of integral, or enumeration, or pointer type, so that it can be matched with a constant integral value.
Recovery
Change the template argument.
A member of a template class defined in a template declaration must be a static member.
Recovery
Make the member static or remove it from the template declaration.
All template arguments for a non-class template must be used in the declaration of the name or the function argument list.
Recovery
Ensure all template arguments are used in the declaration of the name or the function argument list.
Following the template argument, a template declaration must declare a class, a function, or a static data member of a template class.
Recovery
Change the template declaration to declare a class, a function, or a template class member.
The declaration of the function differs from a previous declaration in only the return type.
Recovery
Change the return type so that it matches the previous return type.
The specified name is a class member, but no class qualification has been used to reference it.
Recovery
Add a class qualification to the class member.
The expression in an "#if" or "#elif" preprocessor directive is either not a valid expression or not a constant expression. No keywords are recognized in such an expression and non-macro identifiers are replaced by the constant 0.
Recovery
Change the expression for the preprocessor directive.
An initializer was already specified in the constructor definition.
Recovery
Remove the additional initializer.
The "#" operator in a macro replacement list must be followed by a macro parameter.
Recovery
Add a macro parameter after the "#" operator.
The "##" operator must be preceded and followed by valid tokens in the macro replacement list.
Recovery
Move the "##" operator in the replacement list.
The end of file has been reached and there are still "#if", "#ifdef" or "#ifndef" statements without a matching "#endif" statement.
Recovery
Ensure that all "#if", "#ifdef", and "#ifndef" statements have matching "#endif" statements.
A copy assignment operator exists but it does not accept the type of the given parameter.
Recovery
Change the copy assignment operator.
Identifiers are not recognized in a preprocessor expression. The specified identifier has been treated as a non-macro identifier and assigned the constant 0.
You cannot call a constructor explicitly. It is called implicitly when an object of the class is created.
Recovery
Remove the call to the constructor.
The catch clause can never be reached since any exception type that matches it will also be matched by the specified previous catch clause.
Recovery
Change or remove one of the catch clauses.
An array of class objects must be initialized by calling the default constructor, but one has not been declared.
Recovery
Declare a default constructor for the array.
An array of class objects must be initialized by calling the default constructor, but the call is ambiguous.
Recovery
Ensure that only one default constructor exists.
You cannot throw a function or an expression of type "void".
Recovery
Change the type or remove the throw expression.
The declaration contains a function declarator with an exception specification but is not the declaration of a function. The exception specification is ignored.
Recovery
Change the function declarator so that it is the declaration of a function.
The default copy constructor cannot be generated for this class because there exists a member or base class that has a private copy constructor, or there are ambiguous base classes, or this class has no name.
Recovery
Ensure that a member or base class does not have a private copy constructor. If not then ensure the class is named and there are no ambiguous references to base classes.
![]()
Summary of Compiler Error Messages