Conversion functions and certain operator functions must be class members. They cannot be defined globally.
Recovery: Remove the global definition or make "&1" a class member.
A declaration of a member function outside its member list must be a function definition. A method of a class that has already been declared inside a class declaration cannot be redeclared outside the class.
Recovery: Either remove the member function declaration outside the member list or change it to a definition.
A class contained within another class cannot have the same name.
Recovery: Rename one of the classes.
An invalid keyword was used in the declaration of a constructor. Qualifiers such as const and volatile are not allowed, nor are storage class keywords.
Recovery: Remove the offending keyword.
An attempt to use the C++ keyword "this" was detected outside class scope. The keyword "this" cannot be used outside a class member function body.
Recovery: Remove or move the "this" keyword.
"const" and "volatile" are only significant for non-static member functions because they are applied to the "this" pointer.
Recovery: Remove the "const" or "volatile" keyword.
Recovery: Remove the ellipsis.
The operator cannot be declared with the given number of parameters.
Recovery: Use the correct number of parameters.
The non-member operator function must have at least one argument which is of class or enum type.
Recovery: Add a parameter or change a parameter to accept class or enum type.
A reference of a member of a class was ambiguous, because it was found in more than one base class.
The compiler detected a non-static member that makes reference to a specific object that has not been instantiated. Only static members can be referenced without associating them with an instance of the containing class.
Recovery: Check the spelling and the class definition. Change the name of the class or function, or define the function as static in that class.
The linkage string in a linkage declaration is not one of the linkages supported by this compiler.
Recovery: Change the linkage string to a valid value or make it "C".
The specified name has already been declared with a different linkage than the current declaration.
Recovery: Remove the redefinition or change one of the names.
If a function is overloaded, at most one of its variants can have non-C++ linkage.
Recovery: Remove one of the non-C++ linkages or do not overload the function.
A function declaration without a linkage specification must not precede the first linkage specification for that function.
Recovery: Add a linkage specification to the first declaration of the function
The catch clause can never be reached because 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.
No variant of the overloaded function matches the argument list on the call any better than all other variants. The argument mismatch could be by type or by the number of arguments.
Recovery: Change the argument list on the call to the overloaded function or change the argument list on one of the overloaded function variants so that a match is found.
More than one variant of the overloaded function matches equally well with the argument list specified on the call.
Recovery: Change the argument list on the call to the overloaded function or change the argument list on one of the overloaded function variants so that one match is found.
The compiler detected an overloaded function or operator that is similar to another and is providing additional information.
Recovery: Ensure this is the desired match.
There is more than one possible conversion from the specified class.
Recovery: Use a cast to select the desired conversion.
The return type of a type conversion operator is implicitly the same as the type to which it converts. A return type is never needed for type conversion operators.
Recovery: Remove the return type specification.
The const/volatile qualification of the type to which the conversion operator returns is implicit in the declaration of the conversion operator. All const/volatile qualifiers must appear after the keyword "operator".
Recovery: Remove the qualifier.
For this type of function, the specified argument must be of the specified type.
Recovery: Ensure that the argument is of the correct type.
For this type of function, the return type must be of the specified type.
Recovery: Ensure that the return type is of the correct type.
A conversion function cannot be declared to convert to the specified type because the type cannot be returned from the function.
Recovery: Change the conversion operator's type to a permitted type.
Recovery: Change the return value of the "operator" function.
Recovery: Change the return type for the "operator->".
Recovery: Remove the qualification.
The specified operator cannot be used with operands of this type.
Recovery: Change either the operator or the operands.
The left hand operand of the (.*) operator must have type "structure" or "class".
Recovery: Change either the operator or the operands.
The left-hand operand of the (->*) operator must have type "pointer to structure" or "pointer to class".
Recovery: Change either the operator or the operands.
The right-hand operand of the (.*) and (->*) operator must have type "pointer to member".
Recovery: Change either the operator or the operands.
The right-hand operand must be of type "pointer to member of T", the left hand operand must be of class T or of a class of which T is an unambiguous and accessible base class.
Recovery: Change either the operator or the operands.
The compiler detected a typedef specification that did not have a type associated with it.
Recovery: Add a type specification to the declaration.
A derived class can only access elements of its base class or base classes.
Recovery: Ensure the class names are correct and the classes are derived properly.
If default initializers are specified in an argument list, there must be default initializers for all later arguments.
Recovery: Remove the default initializers, or provide them for all later arguments, or move the arguments to the end of the list.
The compiler has detected an overloaded function or template that was declared with the same argument having default initializers.
Recovery: Ensure that you wanted to declare the same function or template. If that is the case, remove one of the default initializers. Otherwise, remove one of the declarations or overload the function.
An automatic variable within a function is not accessible from local classes declared within the function.
Recovery: Remove the reference to the local variable.
Recovery: Change one of the names, or always fully qualify the name.
Recovery: Set the virtual function initializer to 0.
Operands from two different enumerations are used in an operation.
Recovery: Ensure both operands are from the same enumeration.
A base class may only be specified once in the base class list for a derived class.
Recovery: Remove one of the specifications.
The compiler has detected an illegal variable in an argument initializer.
Recovery: Remove the variable from the argument initializer.
Either a function or an explicit cast has been specified with the wrong number of arguments.
Recovery: Use the correct number of arguments. Ensure that overloaded functions have the correct number and type of arguments.
Recovery: Specify a non-empty header file name in the #include directive.
The number of errors has reached the number specified on the /N option.
Recovery: Fix the errors or increase the error limit on the /N option.
The linkage type of the function puts certain restrictions on the return type, on which the function definition violated.
Recovery: Check the linkage type restrictions and change the return type.
The function has FORTRAN linkage type with the RETURNCODE option. Therefore it should be a FORTRAN function defined somewhere else and referenced here (should not be defined in the compile unit).
Recovery: Make sure the function is a FORTRAN function.
The variable/function is not exported because option(s) LONGNAME or RENT is specified.
Recovery: Make sure the LONGNAME and RENT options are specified.
Variables with NORENT option cannot be exported.
Only objects with external storage class can be exported.
Main cannot be exported.
Recovery: Remove the pragma export for main.
The variable cannot be exported because it is not defined here.
Recovery: Remove the pragma export for the variable.
One or more keywords were found in an invalied location.
Recovery: Remove the keyword(s) or place them immediately to the left of the identifier to which they apply.
The keyword is being applied to the return type of a function.
Recovery: Remove the keyword.
The keywords conflict and cannot both be used in the same declaration.
Recovery: Remove one of the keywords.
The keyword was used more than once in the same declaration.
Recovery: Remove one of the keywords.
The function specified in the pragma linkage builtin is not a
Recovery: Check the function name and correct; or remove the pragma if it is
The keyword has been applied to an identifier which does not correspond to a function type.
Recovery: Check that the correct identifier is specified or remove the keyword.
In each compilation unit, only one of "main" and "WinMain" is allowed.
Recovery: Remove either "main" or "WinMain".
The keyword conflicts with another keyword specified in the same declaration.
Recovery: Remove one of the keywords.
![]()
Summary of Compiler Error Messages