### C++ Compiler Error Messages EDC3001-3099

EDC3001
  "private" assumed for base class "&1".

  No access specifier has been provided for a base class. A base class can be declared with the access specifier "public" or "private". The C++ language specification requires that "private" becomes the default when no access specifier is present. It is good coding practice to explicitly provide the access specifier for the base class.

  Recovery

  Provide an access specifier or accept the default.

EDC3002
  "&1" is not used in function "&2".

  The specified symbol has been declared within a function but it has not been set or used. This is only an informational message because you can declare symbols that are not unused, but it is probably undesirable.

  Recovery

  Ignore the message, use the symbol, or remove the symbol.

EDC3003
  Ambiguous conversion between "&1" and "&2".

  The compiler was not able to find a single type common to the two specified types and was therefore unable to convert from one to the other.

  Recovery

  Explicitly cast the type to an intermediate type and then convert to requested type.

EDC3004
  "&1" statement is not allowed in this scope.

  The specified statement was found outside the valid scope for such a statement. This typically means that it is outside any function.

  Recovery

  Place the statement in the correct scope or remove it.

EDC3005
  Duplicate "default" statement in switch.

  Only one "default" label is allowed in a "switch" statement. This "default" label is not the first in the switch statement.

  Recovery

  If you have nested switch statements, check that the braces match correctly. If they do not match, remove one of the "default" labels.

EDC3006
  Duplicate definition of label "&1".

  The specified label has already been defined in the current function. A label can only be declared once within a function.

  Recovery

  Remove or rename one of the label definitions.

EDC3007
  The "#line" macro directive may cause information for the browser to be corrupted.

  The compiler generates information for the class browser. Using the "#line" preprocessor directive may cause that information to be corrupted.

  Recovery

  Remove the "#line" macro directive or note the possible corruption.

EDC3008
  Source file &1 cannot be opened.

  The compiler could not open the specified source file.

  Recovery

  Ensure the source file name is correct. Ensure that the correct file is being read and has not been corrupted. If the file is located on a LAN drive, ensure the LAN is working properly. Also, the file may be locked by another process or access may be denied because of insufficient permission.

EDC3009
  An error occurred while reading file "&1".

  The compiler detected an error while reading from the specified file.

  Recovery

  Ensure the correct file is being read. If the file resides on a LAN drive, ensure that the LAN is working correctly.

EDC3010
  Source file name is missing.

  The name of the source file to be compiled was missing from the compiler invocation.

  Recovery

  Ensure that you specify the source file name. Ensure the compiler options are specified correctly as well; the compiler may misinterpret the command line if the options are specified incorrectly.

EDC3011
  "&1" is unmatched at end of file.

  The end of the source file was reached and the comment or block was not closed. It is also possible that there was a typographical error earlier in the source file.

  Recovery

  Check the source file for typographical errors. End the comment or block before the end of the file.

EDC3012
  A return value is not allowed for this function.

  A function with a return type of "void" cannot return a value.

  Recovery

  Remove the value or expression from the return statement, remove the return statement, or change the return type of the function.

EDC3013
  Identifier "&1" is undefined.

  The specified identifier is used but has not been defined.

  Recovery

  Define the identifier before using it. Check its spelling. If the identifier has been defined in a header file, check that any required macros have been defined.

EDC3014
  Wrong number of arguments for macro "&1".

  The specified macro was defined with a different number of arguments than are used in this macro call.

  Recovery

  Ensure that the macro call corresponds to the macro definition. Check the number and levels of corresponding braces in the macro.

EDC3015
  The compiler could not open the output file "&1".

  Recovery

  Ensure the output file name is correct. Also, ensure that the location of the output file has sufficient storage available. If using a LAN drive, ensure that the LAN is working properly and you have permission to write to the disk.

EDC3016
  &1 member "&2" cannot be accessed.

  The specified member is private, protected, or is a member of a private base class and cannot be accessed from the current scope.

  Recovery

  Check the access specification rules for the member function and change the access specifier if necessary. If the member function belongs to a base class, check the access specifier of the base class where the current class is defined.

EDC3017
  Return value of type "&1" is expected.

  No value is returned from the current function, but the function is expecting a non-void return value. The function was declared with a return type but the compiler did not detect a return statement. Only functions with a void return type may have no return statement or have a return statement with no return value.

  Recovery

  Return a value from the function or change the functions's return type to void.

EDC3018
  "&1" cannot be made a &2 member.

  An attempt is made to give private access to a base class member or to give an access that is different from the access the member was declared with. A derived class can only change the access of a base class member to public or protected if the access of that member was not private in the base class.

  Recovery

  Remove the invalid access statement or change the access specifier in the base class.

EDC3019
  Case expression is not an integral constant expression.

  The expression in a "case" statement must be an integral constant expression followed by a colon ( :). A constant expression has a value that can be determined during compilation and does not change during execution.

  Recovery

  Use an integral constant expression.

EDC3020
  Inline assembly code is ignored.

  The compiler does not emit executable code from inlined assembly language instructions.

  Recovery

  Ignore the message or replace the assembly code with C++.

EDC3021
  Expected "end of line" and found "&1" in preprocessor directive.

  The compiler detected a preprocessor directive at the beginning of this line, then found an error in the directive. The rest of the line in the preprocessor directive is ignored.

  Recovery

  Remove the unexpected token so that only the preprocessor directive appears on the line.

EDC3022
  "&1" was previously declared as "&2".

  The declaration conflicts with a previous declaration of the same name.

  Recovery

  Change one of the names or eliminate one of the declarations.

EDC3023
  "&1" has already been defined.

  An attempt is being made to define a name that has already been defined.

  Recovery

  Change one of the names or remove one of the definitions. Check the spelling and the scope of the two variables.

EDC3024
  Declaration of "&1" must be a function definition.

  A declaration of a member function outside its member list must be a function definition. Once you declare a member function inside a class declaration, you cannot redeclare it outside the class.

  Recovery

  Either remove the member function declaration outside the member list or change it to a definition.

EDC3025
  "&1" conflicts with "&2".

  These two attributes cannot both be specified in the same declaration.

  Recovery

  Remove one of the specified attributes.

EDC3026
  Keyword "&1" is not allowed.

  The specified keyword is not allowed in this context.

  Recovery

  Remove the keyword.

EDC3027
  Preprocessor directive "#&1" is not recognized.

  The compiler identified a # character at the start of a line and did not recognize the preprocessor directive following it.

  Recovery

  Check the spelling of the preprocessor directive.

EDC3028
  The syntax of the file name in the "#include" directive is not valid.

  The compiler detected an #include preprocessor directive but could not parse the file name. The file name in the #include directive must be within double quotation marks ("") or angle brackets (<>).

  Recovery

  Correct the syntax of the file name.

EDC3029
  Expected integer line number and found "&1".

  The operand of the "#line" directive must be an integer line number.

  Recovery

  Ensure that the "#line" directive contains an integer line number operand.

EDC3030
  The macro "&1" has already been defined.

  An active definition already exists for the macro name being defined. The last definition will be used.

  Recovery

  Remove or rename one of the macro definitions.

EDC3032
  Unexpected preprocessor directive "#&1".

  An "#else", "#elif" or "#endif" preprocessor directive was found out of context.

  Recovery

  Remove or move the preprocessor directive. Check nesting of #if, #else, #elif, and #endif.

EDC3033
  The for-init-statement must be a declaration or expression.

  The initializer statement within a "for" statement must be a declaration or expression.

  Recovery

  Change the for-init-statement to a declaration or an expression.

EDC3034
  "&1" has a function body but is not a function.

  The name is not declared as a function; there may be parentheses missing after the function name.

  Recovery

  Correct the declaration.

EDC3035
  The array boundary in "&1" is missing.

  An array must be defined with at least one element. Use a pointer if you want to dynamically allocate memory for the array.

  Recovery

  Add an array bound.

EDC3036
  The bit-field length must be an integral constant expression.

  The bit-field length, which is the value to the right of the colon, must be an integer. A constant expression has a value that can be determined during compilation and does not change during execution.

  Recovery

  Change the bit-field length to an integral constant expression.

EDC3037
  "&1" is not a base class of "&2".

  A derived class attempted to access elements of a class it did not inherit from. 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.

EDC3038
  The array bound must be a positive integral constant expression.

  The compiler detected an array declaration that did not have a constant that is greater than 0 for the array bounds. Use pointers if you want to dynamically allocate storage for arrays.

  Recovery

  Change the array bound to an integral constant expression or change it to a pointer. A constant expression has a value that can be determined during compilation and does not change during execution.

EDC3039
  "&1" has the same name as its containing class.

  The compiler has detected conflicting names for objects within a class declaration. Nested class declarations must have different names.

  Recovery

  Change the name of the conflicting class.

EDC3040
  A destructor can only be used in a function declaration or in a function call.

  The compiler has detected an incorrect destructor call.

  Recovery

  Check the call to the destructor to ensure no braces are missing. If the braces are correct, remove the destructor call.

EDC3041
  An initializer is not allowed for "&1".

  The compiler detected an initializer where one is not permitted. For example, a class member declarator cannot contain an initializer.

  Recovery

  Remove the initializer.

EDC3042
  Function "&1" is nested within another function.

  You cannot nest functions in C++.

  Recovery

  Ensure that a "}" is not missing before the start of the function. Remove the nested function.

EDC3043
  The string must be terminated before the end of the line.

  The compiler detected a string that was not terminated before an end-of-line character was found.

  Recovery

  End the string before the end of the line, or use "\" to continue the string on the next line. The "\" must be the last character on the line.

EDC3044
  extern "&1" is not a recognized linkage; extern "C" is assumed.

  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.

EDC3045
  Syntax error in directive - expected "&1" and found "&2".

  A syntax error was found during preprocessing. The message identifies what the compiler expected and what it actually found.

  Recovery

  Correct the syntax.

EDC3047
  An expression of type "&1" cannot be followed by the function call operator ().

  The compiler detected an expression followed by the function call operator. The expression must be of type function, pointer to function, or reference to function.

  Recovery

  Change the type of expression or remove the function call operator.

EDC3048
  The "this" keyword is only valid in class scope.

  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.

EDC3049
  The option "&1" is not supported.

  The command line contained an option that is not supported. Note that some option parameters must not have spaces between the option and the parameter.

  Recovery

  Remove the option. Check the syntax of the options.

EDC3050
  A destructor cannot have arguments.

  Recovery

  Remove the arguments from the destructor.

EDC3051
  A declaration has been made without a type specification.

  The compiler detected a typedef specification that did not have a type associated with it.

  Recovery

  Add a type specification to the declaration.

EDC3052
  Return type cannot be specified for "&1".

  The compiler detected a return type where one is not permitted. For example, putting a return type on a constructor is not permitted.

  Recovery

  Remove the return type specification for the function.

EDC3053
  Class qualification for "&1" is not allowed.

  Explicit class qualification is not allowed in this context.

  Recovery

  Remove the class qualification.

EDC3054
  The "&1" operator is not allowed between "&2" and "&3".

  The compiler detected an illegal operator between two operands. For user-defined types, you must overload the operator to accept the user-defined types.

  Recovery

  Change the operator or change the operands.

EDC3055
  "&1" cannot be converted to "&2".

  The type conversion cannot be performed because there is no conversion between the types. This can occur in an initialization, assignment, or expression statement.

  Recovery

  Change one of the types or overload the operator.

EDC3056
  Operand for "&1" must be a pointer or an array.

  The specified operator must have an operand which is a pointer or an array.

  Recovery

  Change the operand to either a pointer or an array.

EDC3057
  Syntax error - "&1" is not a class name.

  A class name must be specified in this context.

  Recovery

  Specify a class name. Check the spelling.

EDC3058
  Operand of "&1" operator must be an lvalue.

  The compiler detected an operand that is not an lvalue. An lvalue is an expression that represents an object. For example, the left hand side of an assignment statement must be an lvalue.

  Recovery

  Change the operand to an lvalue.

EDC3059
  const expression cannot be modified.

  You can initialize a const object, but its value cannot change afterwards.

  Recovery

  Eliminate the const type qualifier from the expression or do not use it with the increment/decrement operators.

EDC3060
  An expression of type "&1" is not allowed on the left side of "&2&3".

  The compiler detected a mismatch between the operands of an operator.

  Recovery

  Change the operand type or use a different operator.

EDC3061
  "&1" is neither an immediate base class nor a non-static data member of class "&2".

  The compiler has detected an element of the initializer list that is not an element of the member list. In the constructor initializer list, you can only initialize immediate base classes and data members not inherited from a base class.

  Recovery

  Change the constructor initializer list.

EDC3062
  Constructor initializer list is not allowed for non-constructor function.

  An attempt is being made to give a constructor initializer list to a non-constructor function. A constructor initializer list is only allowed for a constructor function.

  Recovery

  Remove the constructor initializer list.

EDC3063
  Variable "&1" is not allowed in an argument initializer.

  The compiler has detected a default argument initialized by a parameter.

  Recovery

  Remove the parameter from the default argument initialization.

EDC3064
  There are too many initializers in the initializer list.

  The compiler detected more initializers than were present in the function declaration.

  Recovery

  Remove one or more initializers from the initializer list. Make sure the number of initializers in the initializer list corresponds to the number of arguments in the function declaration.

EDC3065
  An initializer is not allowed for an array allocated by "new".

  Recovery

  Remove the initializer or remove the "new" allocation.

EDC3066
  The bit-field length must not be more than &1.

  The bit-field length must not exceed the maximum bit size of the bit-field type.

  Recovery

  Reduce the bit-field length.

EDC3067
  The type of "&1" cannot be "&2".

  The compiler detected a conflict in a type declaration.

  Recovery

  Change the type.

EDC3068
  Function overloading conflict between "&1" and "&2".

  The compiler detected function argument types that did not match.

  Recovery

  Change the argument declarations of the functions.

EDC3069
  Declarations of the same &1 must not specify default initializers for the same argument.

  The compiler has detected a duplicate default initializer value for the same argument in both overloaded functions or in both templates.

  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.

EDC3070
  Call does not match any argument list for "&1".

  No variant of the overloaded function matches the argument list. The argument mismatch could be by type or 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.

EDC3071
  Call to "&1" matches more than one function.

  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 only one match is found.

EDC3072
  Linkage for "&1" cannot be redefined.

  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.

EDC3073
  The "operator" declaration must declare a function.

  The keyword "operator" can only be used to declare an operator function.

  Recovery

  Check the declaration of the operator and make sure the function declarator () appears after it. Use the "operator" keyword to declare an operator function or remove it.

EDC3074
  Operand for "&1" is of type "&2" which is not of type pointer to member.

  The specified operator must have an operand which is of type pointer to member.

  Recovery

  Change the operand to type pointer to member.

EDC3075
  "&1" is not allowed as a function return type.

  You cannot declare a function with a function or an array as its return type.

  Recovery

  Declare the function to return a pointer to the function or the array element type.

EDC3076
  "&1" is not allowed as an array element type.

  The C++ language does not allow the declaration of an array of functions or references, or an array of type void.

  Recovery

  Remove the declaration or change the declaration so that it is an array of pointer to functions, pointers to references, or pointers to void.

EDC3077
  const variable "&1" does not have an initializer.

  You can only assign a value to a const variable using an initializer. This variable has no initializer, so it can never be given a value.

  Recovery

  Initialize the variable or remove the "const" keyword.

EDC3078
  Non-static member "&1" must be associated with an object or a pointer to an object.

  The compiler detected a non-static member making a reference to an object that has not been instantiated. You can reference only static members 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.

EDC3079
  "&1" is not a member of "&2".

  The class is used explicitly as the scope qualifier of the member name, but the class does not contain a member of that name.

  Recovery

  Check the spelling of the scope qualifier. Change the scope qualifier to the class containing that member, or remove it.

EDC3080
  Wrong number of arguments for "&1".

  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.

EDC3081
  "&1" must be a class member.

  Conversion functions and certain operator functions must be class members. They cannot be defined globally.

  Recovery

  Remove the global definition or make the function a class member.

EDC3082
  An argument type of "&1" is not allowed for "&2".

  The function being declared has restrictions on what types its arguments can have. The specified type is not allowed for this argument.

  Recovery

  Change the argument type.

EDC3083
  "&2" cannot have a return type of "&1".

  The specified operator function has the wrong return type.

  Recovery

  Change the return type.

EDC3084
  The array operator must have one operand of pointer type and one of integral type.

  This error may result from the incorrect use of the array operator.

  Recovery

  Change the operands of the array operator.

EDC3085
  Wrong number of arguments specified in the function call.

  The number of arguments in the function call does not match the number of arguments in the function declaration.

  Recovery

  Ensure the function declaration and function call specify the same number of arguments.

EDC3086
  &1

  This message has been generated by the "#error" preprocessor directive, which is a user-defined error message placed in the source code.

EDC3087
  "&1" operator is not allowed for type "&2".

  The specified operator cannot be used with operands of this type.

  Recovery

  Change either the operator or the operands.

EDC3088
  Insufficient memory.

  The compiler ran out of memory during compilation.

  Recovery

  End unnecessary processes and recompile.

EDC3089
  More than one function "&1" has non-C++ linkage.

  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.

EDC3090
  Syntax error - expected "&1" and found "&2".

  A syntax error was found while parsing the program. The message identifies what the compiler expected and what it actually found. Often the source of the error is an unmatched parenthesis or a missing semicolon.

  Recovery

  Correct the syntax.

EDC3091
  "&1" is not allowed for &2.

  The attribute or name cannot be specified in the given context. The compiler detected incompatible names that conflict with the language definition.

  Recovery

  Remove the attribute or name.

EDC3092
  "&1" conflicts with previous "&2" declaration.

  The declaration conflicts with a previous declaration of the same symbol.

  Recovery

  Remove one of the declarations or make them identical.

EDC3093
  Initializer is too long.

  The string initializer for a character or wide-character array has more characters than the array. Note that the trailing null character is treated as part of the initializer.

  Recovery

  Increase the size of the array or reduce the size of the initializer.

EDC3094
  The "operator->" function must return a class type that contains an "operator->" function.

  The "operator->" function must return either a class type, a reference to a class type, or a pointer to class type, and the class type must itself have an "operator->" function.

  Recovery

  Change the return value of the "operator->" function.

EDC3095
  Unused "&1" definition.

  An unnamed class or struct definition was found that has no object associated with it. The definition can never be referenced. A class can be unnamed, but it cannot be passed as an argument or returned as a value. An unnamed class cannot have any constructors or destructors.

  Recovery

  Create an object for the class or struct, or remove the definition.

EDC3096
  Internal compiler error at line &1 in module "&2" :colon. &3.

  The compiler detected an error that it is not able to recover from. The error was found within the compiler itself.

  Recovery

  Note the line and module references in this message. Contact your IBM Representative.

EDC3097
  Reference to member "&1" of undefined class "&2".

  The member has been explicitly given the specified class as a scope qualifier but the class (and hence the member) has not been defined.

  Recovery

  Check for a missing #include file. Define the class and member.

EDC3098
  Pointer conversion may be wrong if the classes are related in a multiple inheritance hierarchy.

  The relationship between the classes in a pointer conversion is not known. If the target class is later defined as a base class of the source class in a multiple inheritance, this conversion will be wrong if the value of the pointer should have been modified by the conversion.

  Recovery

  Change the ambiguous reference in the conversion.

EDC3099
  "&1" is used but not set in function "&2".

  The specified symbol is being used but has not been assigned a valid value. Its value will be undefined.

  Recovery

  Define or initialize the symbol before using it.

Summary of Compiler Error Messages