China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 19:49
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Turbo C++ Error Messages (V2.0) [Repost] View 1,726 Replies 6
Original Poster Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
Turbo C++ Error Messages (V2.0) 

/

--------------------------------------------------------------------------------
   In the error messages listed in this appendix, words enclosed in single quotes represent a generic name or value. The error message the user sees on the screen is the message after that word has been replaced with a specific name or value. For example: if a C++ function goforit has an error, the actual message the user sees on the screen is:
   goforit must be declared with no arguments
   To look up this message, you must find the following entry:
   function must be declared with no arguments
   Below are the generic names and values enclosed in quotes used in the error messages in this appendix. The error message the user gets should first be replaced with the corresponding name or value, and then looked up.
   Seen in the manual Seen on the screen
   argument a command line or other argument
   class a class name
   field a field reference
   filename a file name (with or without extension)
   group a group name
   identifier an identifier (variable name or other)
   Language the name of a programming language
   member the name of a data member or member function
   message a message string
   module a module name
   number an actual number
   option a command line or other option
   parameter a parameter name
   segment a segment name
   specifier a type specifier
   symbol a symbol
   xxxxh a 4-digit hexadecimal number followed by h
   This appendix lists the error messages in ASCII alphabetical order. Messages beginning with symbols (equal sign, comma, parentheses, etc.) are usually placed first. Since the error messages beginning with the variables listed in the above table cannot be arranged in the alphabetical order of the actual message seen on the screen, all such messages are always placed at the beginning of each error message table.
   If the variable appears later in the body of the error message, for example:
   Incorrect command__Lineargument
   then it can be looked up in alphabetical order under this error message; here it can be found among the messages beginning with “I”.
   I. Runtime errors
   Turbo C++ has only a small number of runtime error messages. They are listed below in alphabetical order.
   ●Abnormal program terminationThe program terminated abnormally. This is caused by insufficient memory found while the program is running. In addition, calling the function abort will display this message. Some runtime errors will call the abort function at the end, so this message will be displayed.
   ●Divide by 0
   Integer division by 0. This error can be detected by the signal function. In addition, the abort function will also be called, causing the program to terminate abnormally.
   ●Floating point error: Divide by 0
   The divisor is 0. For example, 1.0/0.0.
   ●Floating point error: Domain
   The result is not a number. For example, 0.0/0.0.
   ●Floating point error: Overflow
   The result is +∞ or -∞ with complete loss of precision. For example:
   double x=le200*le200
   ●Floating point error: Partial loss of precision
   Precision was lost during a floating-point operation. By default this error is masked; you can call control87 to remove the mask.
   ●Floating point error:Underflow
   Underflow occurred during a floating-point operation, and the underflow value was replaced with 0.0. By default this error is masked; you can call control87 to remove the mask.
   ●Floating point error: Stack fault
   A floating-point operation caused stack overflow. This error does not occur often; it may be due to too many registers being used in assembly code, or because a floating-point function was not declared.
   Note: all of the floating-point errors above can be masked with the function control 187, and can also be caught with the function signal. In addition, these floating-point errors will also call the function abort, to print: Abnormal program termination, and call exit(3).
   ●Null pointer assignment
   When a small or medium memory model program exits, the contents of several bytes at the beginning of the program data segment are checked to see whether they have changed. If these bytes have been changed, this message is displayed. Usually this is because a value was stored into an uninitialized pointer. Even if the program producing this error appears to run normally in other respects, it reflects a serious internal error and should be taken seriously. Indirect assignment through an uninitialized pointer may lead to unpredictable consequences (in large, compact, or huge memory models, “deadlock” may also occur). In the integrated debugger you can trace the null pointer.
   ●Stack overflow
   The default stack size in a Turbo C++ program is 4096 bytes. This is enough for most programs, but stack overflow may occur when the program performs complex recursion or uses a large amount of local data. This message can be obtained only when the stack-checking feature is turned on. To correct this error, you can try using a larger memory model, or increase the stack size by changing the value of the global variable stklen, or reduce the program's use of the stack. To reduce the amount of local data in a function, you can declare it as a static variable (static). For example:
   void anyfunction(void)
   {
   static int buf[2000]; /*allocated in the data segment*/
   int list [2000]; /*allocated on the stack*/
   Declaring local variables as static has two disadvantages:
   1. It permanently occupies space outside the global variables and stack, though this is only a minor disadvantage. 2. If variables in a function are declared static, then that function cannot be called recursively or asynchronously. Because for variables declared as Static, each call to the function uses the same space rather than separate space.
   II. Compile errors
   Diagnostic messages produced by the Turbo C++ compiler (TC or TCC) are divided into three kinds: fatal errors, errors, and warnings.
   ●Fatal errors: cause the compilation process to stop immediately. Appropriate corrective action should be taken, and then recompilation should be done.
   ●Errors: indicate program syntax errors, disk or memory access errors, and command line errors. The compiler will complete the current compilation phase and then stop. Also, at each compilation phase (preprocessing, parsing, optimization, and code generation), the compiler will find as many real errors in the source program as possible.
   ●Warnings: do not terminate the compilation process. They indicate questionable conditions that are legal as part of the language. When machine-dependent constructs are used, the compiler always generates warning messages.
   The compiler displays messages in the following format: first the message type, then the file name and line number, and finally the message text. In each category below, they are listed in alphabetical order. 
   1. Fatal errors
   ●Bad call of inline function
   An inline function defined using a macro definition (a predefined macro) was not called in the correct way. In C, predefined inline functions begin and end with double underscores (__).
   ●Irreducible expression tree
   An expression on the error line caused the code generator to be unable to generate code. This is an internal compiler error, and that expression will not be translated. If this error ever occurs, notify Borland.
   ●Out of memory
   Out of memory during compilation. Either increase machine memory, or if your machine already has 640K of memory, simplify the source file.
   ●Register allocation failure
   An expression on the error line is too complex for the code generator to generate code for it. This is also an internal compiler error. Simplify the expression. If this error occurs, notify Borland.
   2. Errors
   ●constructorcannot return a value
   A return statement in a C++ constructor cannot have an expression as a return value.
   ●constructoris not a base class of class
   A constructor constructor of a C++ class class tried to call a base-class constructor, or you tried to change the access permission of class::constructor. constructor is not a base class of class. Check your declaration.
   ●functionlcannot be distinguished from function2
   The difference between the parameter type lists in the declarations of function1 and function2 is not enough to distinguish them. You can try changing the parameter type or parameter order in one of the functions.
   ●functionis ambiguous
   In a function call, more than one overloaded function parameter list can match the argument list of the call (using the default parameter conversion rules). One or more arguments should be explicitly type-converted to resolve this ambiguity.
   ●functionmust be declared with no argumentsThis C++ operator function cannot have any arguments.
   ●functionmust be declared with one argumentThis C++ operator function can only have one argument.
   ●functionmust be declared with two argumentsThis C++ operator function must have two arguments.
   ●functionwas previously declared without staticThis function is declared here as static, but earlier it was already declared as external (extern) or global. ANSI C does not allow this.
   ●functionwsa previously declared with the language languageThis function was declared in different places with different language modifiers (cdecl, pascal, or interrupt), which is an error.
   ●identifier cannot be declared in an anonymous unionAn anonymous union cannot contain member functions or static members. Anonymous unions can contain only data members.
   ●identifier cannot be used in static member function
   A static member function can use only static members in its class, even though it has full access privilege. This error is caused by trying to use a member that requires the this pointer.
   ●identifieris inaccessible because also in class
   It is illegal to use a class as both a direct base class and an indirect base class. You can declare the base class virtual in both places.
   ●identifier is not a data member and cant be initialized here
   In a constructor, only data members can be initialized. This message indicates that the initializer list contains a static member or function member.
   ●identifieris not a member of struct
   identifier is being referenced as a structure member, but it is not a structure member. Check your declaration.
   ●identifieris not a parameter
   In the parameter declaration part of an old-style function definition, idenitfier is declared, but it is not listed as a parameter. You can remove this declaration or make identifier a parameter.
   ●identifieris not legal here
   The type specifier identifier conflicts with or duplicates another type name, or it is being used as a typedef name when in this scope it is not a typedef name.
   ●identifieris virtual and cannot be explicitly initialized
   A constructor of a C++ class tried to call the base-class constructor identifier, but that base class is a virtual base class. A virtual base class cannot be explicitly initialized; the compiler will automatically make an implicit call to the base class default constructor base::base().
   ●identifiermust be a member function
   Most C++ operator functions can be either class members or ordinary non-member functions, but some can only be member functions of a class. These are operator=, operator→, operator(), and type conversions.
   ●identifiermust be a member function or have an argument of class type
   Most operator functions must have an explicit or implicit argument of class type. This operator function is declared outside a class and has no explicit class-type argument.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 2 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●identifiermust be a previously defined class or struct
   An attempt was made to declare identifier as a base class, but it is not a class, or it has not yet been completely defined. Please correct the name or rearrange these declarations.
   ●identifier must be a previously defined enumeration tag
   An attempt was made to use identifier as an enumeration tag, but it has not yet been declared. Correct the name or rearrange the declaration.
   ●identifiermust be a previouslyde fined structure tagAn attempt was made to use idebtififier as a structure tag, but it has not yet been declared. Correct this name or rearrange the declaration.
   ●identifierspecifies multiple or duplicate access
   A base class can be declared public or private, but not both; this access specifier can appear only once for a base class.
   ●memberis not accessible
   The C++ class member member is declared private or protected, so it cannot be referenced from this function. It sometimes appears when trying to call an accessible overloaded member function (or constructor), but its arguments match an inaccessible function. Overloaded function checking is always completed before accessibility checking; if that is the problem, try using explicit type conversions on one or more arguments to select the desired accessible function.
   ●specifierhas already been included
   This type specifier has appeared more than once in the current declaration; remove or change one of them.
   ●=expected
   The assignment operator (=) is missing in a variable initialization.
   ●,expected
   A comma (,) is missing in a declaration list, initializer list, or parameter list.
   ●{expected
   A left brace ({) is missing at the beginning of a block or initializer list.
   ●(expected
   A left parenthesis is missing before the parameter list.
   ●}expected
   A right brace (}) is missing at the end of a block or initializer list.
   ●)expected
   A right parenthesis is missing at the end of the parameter list.
   ●:expected after private /protected/public
   The reserved word private/protected/public must be followed by a colon (.
   ●::requires a preceding identifier in this context
   In a declaration, the C++ double colon (: must be preceded by a qualifying class name. An unqualified double colon can be used only in expressions to indicate global scope, and cannot be used in a declaration.
   ●.*operands do not match
   The right side of the C++ dot-star operator (.*) must be a pointer to a member of the class given on the left side of the operator.
   ●#operator not followed by macro argument name
   In a macro definition, # can be used to indicate that the following macro argument is to be replaced by a string, so # must be followed by a macro argument name.
   ●Access can only be changed to public or protected
   A C++ derived class can modify the access permission of a base-class member, but it can only become public or protected. A base-class member cannot become private.
   ●Access declarations cannot grant or reduce access
   A C++ derived class can modify the access permission of a base-class member, but it can only restore it to the access in the base class; it cannot increase or reduce its access.
   ●Access specifier specifier found in a union
   The C++ access specifiers public private protected cannot be used in a union.
   ●Ambiguity between functionl and function2
   Two named overloaded functions can both be used with the provided arguments; this ambiguity is not allowed.
   ●Ambiguous conversion functions:typeland type2
   An attempt was made to convert a supplied type to the desired type in multiple ways.
   ●Array bounds missing]
   A right bracket (]) is missing in an array declaration.
   ●Array must have at least one element
   ANSI C and C++ require that an array be defined with at least one element. An earlier programming trick was to declare a structure's array member with zero length and then use malloc to allocate the actual required space. This trick can still be used now, but the array length must be at least one element. Of course, an array declaration of unknown size (note, different from a definition) is allowed.
   For example:
   char ray[]; /*definition of unknown length_illegal*/ 
   char ray[0]; /*definition of length 0_illegal*/ 
   extern char ray[];/*declaration of unknown length_OK*/
   ●Array of references is not allowed
   An array of reference type is illegal. Because pointers to references are not allowed, and array names are converted to pointers.
   ●Array size too large
   The array length exceeds 64K bytes.
   ●Assembler statement too long
   The code length of an inline assembly statement cannot exceed 480 bytes.
   ●Attempting to return a reference to local name identifier
   A C++ function returns a reference type, but you are trying to return a reference to a local (automatic) variable, which is illegal. Because when the function exits, the variable referred to by this reference no longer exists. You can return a reference to any static or global variable, or change the function to return a value.
   ●Bad file name format in include directiveThe include file name must be enclosed in double quotes (“”) or angle brackets ().
   ●Bad ifdef directive syntaxThe # directive must have an identifier (and nothing else) as the directive body.
   ●Bad ifndef directive syntaxSame as the previous error message.
   ●Bad return type for a type conversion operator
   A C++ type-conversion member function specified a return type different from the type itself. A declaration of conversion function operator T cannot specify any return type.
   ●Bad syntax for pure function definition
   A pure virtual function is indicated by adding =0 in its declaration. Your program is similar to this, but not exactly the same.
   ●Bad undef directive syntaxThe #undef directive must have an identifier (and nothing else) as the directive body.
   ●Base classclassis included more than once
   A C++ class can be directly derived from many base classes, but one specified base class can be directly derived only once.
   ●Base class class is initialized more than once
   In a C++ class constructor, the initializer list following the constructor header includes the base class class more than once.
   ●Base class cannot be declared protected
   A C++ base class must be public or private, but not protected.
   ●Bit field cannot be static
   Only ordinary C++ class data members can be declared static; bit fields cannot.
   ●Bit fields must by signed or unsigned int
   Bit fields must be declared as a signed or unsigned integer type. In ANSI C, bit fields can only be of signed or unsigned int type, not char or long and such.
   ●Bit fields must contain at least one bit 
   The width of a named bit field cannot be zero (or less than 0). The width of an unnamed bit field can be 0, and this is a convention used to force the address of subsequent bit-field members to align to a byte boundary (or a word boundary, if the -a option is used).
   ●Bit field too large
   The given bit-field width exceeds 16 bits.
   ●Body already defined for this function
   The same function can have only one function body.
   ●Call of non-function
   The called name has not been declared as a function. Possibly the function declaration is wrong or the function name is misspelled.
   ●Cannot assign1identifier1 to identifier2
   The two sides of the assignment operator (=) (or a compound assignment operator such as +=) must be type-compatible, and neither can be an array. You are trying to assign the right-hand expression of type identifier1 to the left-hand target of type identifier2.
   ●Cannot call mainfrom within the program
   C++ does not allow recursive calls to function main.
   ●Canot cast from identifier1 to identifier2
   A cast from type identifier1 to identifier2 is not allowed.
   In C, a pointer can be cast to an integer or another pointer. An integer can be cast to any integer, floating-point, or pointer type. A floating-point type can be cast to an integer or floating-point type. Structures and arrays cannot be cast to each other. Usually a Void type cannot be cast.
   In C++, check whether user-defined conversions and constructors exist; if not, apply the above rules (except for pointers to class members). Among integer types, only the constant 0 can be converted to a member pointer.
   A member pointer may be converted to an integer quantity or a similar member pointer. If a member pointer originally points to a data member or function member, then a similar member pointer may also point to a data member or function member; the qualifying class for the cast must be the same as the original one or a base class of the original class.
   ●Cannot create Variable for abstract class class 
   Abstract classes—those with pure virtual functions—cannot be used directly; they can only be used to derive other classes.
   ●Connot define a pointer or reference to a reference
   Pointers to references or references to references are not allowed.
   ●Cannot find class::class (class&) to copy a vector
   When a C++ class class1 contains an array (vector) of a class clsaa2, and you want to construct an object of class Class1 from another object of class Class1, then a constructor class2::class2(class2& is needed so that the array elements can be constructed. This constructor has only one parameter (a reference to its class) and is called a reference constructor.
   Normally the compiler automatically provides a reference constructor, but if you defined a constructor for class class2 with a class& parameter and additional parameters with default values, then such a reference constructor neither exists nor can be generated by the compiler. This is because class2::class2(class2& cannot be distinguished from class2::class2(class2&,int=1). You must redefine this constructor so that not all parameters have default values. Then you can define a reference constructor or let the compiler generate one.
   ●Cannot find identifier::identifier()to initialize a vector
   When a C++ class class1 contains an array (vector) of a class class2, and you want to construct an object of class class1 not from another object of class class1, then a constructor class2::class2() is needed so that the elements of the array can be constructed. This no-argument constructor is called the default constructor. The compiler will automatically provide a default constructor unless you have already defined any constructor for class class2. In that case, the compiler will not automatically provide a default constructor; the user must provide one.
   ●cannot find class::class()to initialize base class
   Whenever a C++ derived class class2 is to be constructed, each of its base classes class1 must first be constructed. If the constructor of class2 does not specify a constructor of class1 (as part of the class2 header), then there must be a class1::class1() as the constructor of the base class. The compiler will automatically provide a default constructor unless you have already defined any constructor for class class1. In that case, the compiler will not automatically provide a default constructor; the user must provide one.
   ●Cannot find class::class() to initialize field identifier
   When a C++ class class1 contains a member of class class2, and you want to construct an object of class class1 not from another object of class class1, then there must be a constructor class2::class2() in order to construct such a member. This no-argument constructor is called the default constructor. The compiler will automatically provide a default constructor unless you have defined any constructor for class class2; in that case the compiler will not automatically provide a default constructor, and the user must provide one.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 3 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●cannot find class:perator=(class&) to copy a vector
   When a C++ class class contains an array (vector) of a class class2 and you want to copy a class class1, there must be an assignment operator class2:perator=(class2& in order to copy the array elements. Normally the compiler automatically provides such an operator. But if you already have an operator= definition for class class2, yet it does not use a parameter of type class2, the compiler will not provide one automatically, and you must provide it yourself.
   ●Cannot have a near member in a far class
   All members of a C++ class must be of far type; its member is a class previously declared as near (or by default).
   ●Cannot initialize a field
   A single field of a struct, union, or C++ class cannot be initialized. Structures and unions can be initialized with initializer lists, while C++ classes can only be initialized by using constructors.
   ●Cannot initialize type1 with type2
   An attempt was made to initialize a target of type type1 with a value of type type2. The initialization rules are basically the same as those for assignment.
   ●Cannot modify a const objectThis indicates an illegal operation on an object declared const, such as assigning to the object.
   ●Cannot overload mainFunction main cannot be overloaded.
   ●Cannot specify base classes except when defining the class
   When specifying a C++ class, the base classes from which it is derived can only be specified at the point where the class is defined. When only declaring a class tag (such as class c, those base classes cannot be specified.
   ●Case outside of switch 
   A case statement appears outside a switch statement. This is usually caused by mismatched braces.
   ●Case statement missing:
   A case statement must be followed immediately by a colon after the constant expression. Either the colon is missing from the expression in the case statement, or some other symbol appears before the colon.
   ●Character constant too long
   A character constant can only be one or two characters long.
   ●Classclasshas a constructor and cannot be hidden
   In C, structure names and ordinary names have different namespaces, while in C++ they can usually share a namespace. In C++, classes with constructors can be distinguished, because constructor declarations are very similar to ordinary function declarations, and this avoids such confusion.
   ●Classes cannot be initialized with{}
   Ordinary C structures can be initialized with a group of values inside braces. A C++ class can only be initialized by a constructor if the class has a constructor, private members, virtual functions, or virtual base classes.
   ●Class member member declared outside its class
   C++ class member functions can only be declared within the class declaration. Unlike non-member functions, they cannot be declared multiple times or declared elsewhere.
   ●Compound statement missing}
   A closing brace is missing at the end of the program. Possibly the braces do not match.
   ●Conflicting type modifiers
   This appears when both near and far keywords are given in a pointer declaration. A pointer can use only one address modifier (far or near), and a function can use only one language modifier (cdecl, pascal, interrupt).
   ●Constant expression requird
   When declaring an array, its size must be given as a fixed constant. Usually this kind of error is caused by misspelling a #define constant.
   ●Constructor cannot have a return type specification
   A C++ constructor has an implicit return type used by the compiler, but you cannot declare a return type or return a value.
   ●Conversion of near pointer not allowed
   When the program is not currently running, a near pointer in the expression evaluation box cannot be converted to a far pointer. This is because the conversion requires knowing the current value of the DS register in the user program, but the user program does not exist.
   ●Could not find a match for argument (s) Could not find a C++ function whose parameters match the arguments you provided.
   ●Could not find file file name The compiler cannot find the file given on the command line.●Declaration does not specify a tag or an identifier
   This declaration does not declare anything. It may be an untagged structure or union without a variable; C++ requires something to be declared here.
   ●Declaration is not allowed here Declarations cannot be used as the controlling statement of for, while, do, if, or switch.
   ●Declaration missing; A semicolon is missing after the declaration of a field in a structure or union.
   ●Declaration syntax error Some symbols are missing from the declaration, or there are extra symbols.
   ●Declaration terminated incorrectly
   A declaration has an extra or incorrect terminating symbol. For example, a semicolon placed after a function body. This error is also produced by a C++ member function declaration that has a semicolon between the beginning of a class and the left brace.
   ●Declaration was expected
   A declaration is missing. Usually this is caused by a missing delimiter (such as a comma, semicolon, right parenthesis, or right brace).
   ●Declare operator delete (void*) or (void*, size__t)
   The delete operator may have only one parameter of type void*, or it may have a second parameter of type size__t. The latter form is preferred over the former; the global operator delete has already been declared in the latter form, so care must be taken if you want to redeclare it.
   ●Default outside of switch
   A default statement appears outside a switch statement. This may be caused by mismatched braces.
   ●Default value missing
   In a C++ function declaration, if one parameter has a default value, then all parameters following it must also have default values.
   ●Define directive needs an identifier
   The first nonblank character after #define must be an identifier.
   ●Destructor cannot have a return type specification
   A C++ destructor cannot return a value, nor can it be given a return type.
   ●Destructor for classis not accessible
   The destructor of this C++ class is protected or private and cannot be called here to destroy the class. If a class's destructor is private, the class cannot be destroyed and therefore cannot be used. A destructor declared protected can only be accessed by derived classes; this method is used to ensure that no instance of the base class is ever created and that only derived classes can be derived from the base class.
   ●Destructor name must match the class name
   In a C++ class, the destructor is declared with a tilde (~), and the destructor name is the same as the class name except that it is preceded by (~). In your program the ~ is used before some other name.
   ●Division by zero In a constant expression, the divisor of a remainder or division operation is zero.
   ●do statement must have whileA do statement is missing the while keyword.
   ●do -while statement missing(do statement, after the while keyword, missing).
   ●do -while statement missing(do statement, after the test expression, missing).
   ●do-while statement missing;A semicolon is missing after the right parenthesis of the do statement test expression.
   ●Duplicate caseEvery case in a switch statement must have a unique constant expression value.
   ●Enum syntax errorAn enum declaration cannot contain a malformed identifier.
   ●Error directive:message
   This error message is generated when the #error pseudo-instruction in the source program is processed; the body of that directive is displayed in this message (replacing massage)
   ●Error writing output file
   A DOS error occurred while the compiler was writing the ,OBJ、,EXE, or temporary file. Possibly there is not enough disk space, or the directory given with the -n option (or the Options |Directories|Output input box) is incorrect.
   ●Expression expected
   An expression is missing. The current symbol cannot be used as the start of an expression. This message may appear in the control expression of an if or while statement, or in a variable initialization, etc. It is often due to accidentally inserting or deleting a symbol.
   ●Expression if too complicated
   The compiler can handle fairly complex expressions, but an expression with hundreds or thousands of terms is too complex. Split it into two or more expressions.
   ●Expression of arithmetic type expected
   The operand of the unary plus (+) and unary minus (-) operators must be an expression of arithmetic type__only char, short, int, long, enum, float, double, and long double types.
   ●Expression of integral type expected
   The operand of the bitwise-not operator (~) must be an expression of integral type (char, short, int, long, and enum).
   ●Expression of scalar type expected
   The operand type is wrong for the operators (!), (++), and (_). It can only be a scalar type: char, short, int, long, enum, float, double, longdouble, or a pointer type.
   ●Expression syntax
   When the compiler analyzes the syntax of an expression, if it finds some serious errors it gives this general message. There may be two consecutive operators, mismatched or missing parentheses, or the previous statement may be missing a semicolon.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 4 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●Expression type does not match the return typeThe type of the return expression cannot be converted to the return type of the function.
   ●extern variable cannot be initializedA variable with storage class extern cannot be initialized in a declaration.
   ●Extra parameter in callWhen calling a function through a pointer defined by a prototype, too many parameters were given.
   ●Extra parameter in call functionToo many parameters in a call to the named function (defined by a prototype).
   ●Field field cannot be used without an objectIn a class::field expression, field is an ordinary (non-static) member, and there is no class associated with that field here. For example, it should be written as obj. class::field is legal; it should not be written as chass::field.
   ●Field field is ambiguous in class
   You must qualify this field reference with a proper base-class name. In C++ class class, the field field may appear in more than one base class, and it is not qualified to indicate which one. This applies only to multiple inheritance, because in multiple inheritance each base-class name cannot have the same field name hidden in a derived class derived from the same base class. The rules of C++ require testing this ambiguity before checking access rights (private, protected, public). Therefore this message may be obtained even when only one (or none) of the fields can be accessed.
   ●Field identifier expected
   A struct or C++ class field name is missing. The right side of the member-selection operator (. or →) must be a field name in the structure or class on its left side.
   ●File must contain at least one external declaration
   ANSI C and C++ require a compilation unit to contain at least some declarations; it cannot be empty.
   ●Flie name too long
   The file name given by the #include pseudo-instruction is too long (it should not exceed 79 characters).
   ●For statement missing(left parenthesis missing after the for keyword).
   ●For statement missing)A right parenthesis is missing after the control expression of the for statement.
   ●For statement missing;A semicolon is missing after some expression in the for statement.
   ●Found: instead of::In declarations and expressions, a C++ class name and its member should be separated by a double colon (:, not a colon (
   ●Friend declarations need a function signatureIf a friend function is declared, the parameter types must also be provided, so that the correct function can be found when overloading.
   ●Friends must be functions or classes, not fieldsA friend of a C++ class must be a function or another class; a field cannot be a friend.
   ●Function call missing)There is some syntax error in the argument list of a function call, for example a missing right parenthesis or mismatched right parenthesis.
   ●Function calls not supported
   In integrated debugger expression evaluation, function calls (including implicit conversion functions, constructors, destructors, overloaded operators, and inline functions) are not allowed.
   ●function defined inline after use as extern
   A function cannot become an inline function after it has been used. Either move the inline definition to the beginning of the file, or delete it entirely.
   ●Function definition cannot be a typedefed declaration
   In C++, a typedef name cannot be used to define a function. For example, type F means a function with no parameters and returning int:typedef int F (void);then defining g as a function of type F like this is illegal:
   F g { / * ... * / }
   But it can be like this, defining g as a function returning a pointer to type F:
   F *g (...) {/ * ... * / }
   ●Function function cannot be static
   Only ordinary member functions and the operators new and delete can be declared static. Constructors, destructors, and other operators cannot.
   ●Functions cannot return arrays or functions Functions cannot return an array or function, but they can return a pointer to one.
   ●Function should return a valueA function with a return value has no return statement, or it has a return statement but gives no return value.
   ●functions may not be part of a struct or unionFunctions cannot be members of a C structure or union. But pointers to functions can be members of a C structure or union, and in C++ functions are allowed to be members.
   ●Global anonymous union not staticIn C++, a global anonymous union at file level must be static.
   ●Goto statement missing labelThe goto keyword must be followed by an identifier.
   ●Group overflowed maximum size:nameThe total size of all segments in a group (such as DGROUP) exceeds 64K.
   ●Identifieridentifier cannot have a type qualifierThe C++ qualified name class::identifier cannot be used here. A qualified name cannot be used for a typedef name, a function declaration (except in a file-level definition), a local variable or function parameter, or a class member (except qualifying it with its own class name, which is redundant but legal).
   ●Identifier expected
   In C, an identifier is missing in the parameter list of an old-style function header.
   ●If statement missing(A left parenthesis is missing after the if keyword.
   ●If statement missing)A right parenthesis is missing after the test expression of the if statement.
   ●Illegal character character (Oxvalue)There is an invalid character in the input file, and its hexadecimal value is printed out. This error may also be caused by passing too many arguments to a function macro.
   ●Illegal initialization
   The initialization must be a constant expression, but it may include the address of a global extern or static variable plus or minus a constant.
   ●Illegal octal digit A non-octal digit appeared in an octal constant (such as 8 or 9)
   ●Illegal parameter tomit
   ●Illegal pointer subtractionYou cannot subtract a pointer from a non-pointer value.
   ●Illegal structure operation
   Illegal operation on a structure. The only operations allowed on a structure are member selection (.), address-of (&, and assignment (=), or passing it to a function as an argument or returning it from a function.
   ●Illegal to take address of bit field Taking the address of a bit-field member is illegal, although the address of other kinds of fields may be taken.
   ●Illegal use of floating pointAn illegal operation was performed on a floating-point number (such as shifting, bitwise Boolean operation, conditional (?, or some other operations)>.
   ●Illegal use of pointerIllegal pointer operation. Pointer operations can only be addition, subtraction, assignment, comparison, indirection (*), or → operation
   ●Im proper use of typedef identifierA typedef name appears in your source file where a variable should appear in an expression. Check the symbol declaration and possible spelling errors.
   ●Improper use of typedef symbolSame as the previous error message.
   ●In compatible type conversionThe requested type conversion cannot be performed.
   ●Incorrect command-line option:optionUnrecognized command-line argument. ●In correct number format
   A decimal point appeared in a hexadecimal number.
   ●In correct use of defaultA colon is missing after the default keyword.
   ●Inline assembly not allowed in an inline function
   Inline assembly statements cannot appear in a C++ inline function. You can turn the function into a macro, remove the inline storage class, or remove the inline assembly code.
   ●Invalid indirectionThe operand of the indirection operator (*) must be a non-void pointer.
   ●Invalid macro argument separatorIn a macro definition, parameters must be separated by commas. The compiler encountered some other character here after a parameter.
   ●Invalid pointer additionAdding two pointers is illegal.
   ●Invalid use of dotAn identifier must be followed immediately by a member-selection operator (.))
   ●Items of typetype need constructors and cannot be passed with...It is illegal to pass an object of a type requiring a constructor to a variable-length argument list (specified with ,...).
   ●Left side must be a structureThe left side of the member-selection (.) or C++ dot-star (.*) operator must be a structure type.
   ●Linkage specification not allowedA linkage specifier (such as externC) can only appear at file level. Move this function declaration out to file level.
   ●Lvalue required
   The left side of an assignment operation must be an addressable expression. This includes an arithmetic or pointer variable, a structure field reference, a reference through a pointer, or an array element.
   ●Macro argument syntax errorParameters in a macro definition must be identifiers. The compiler encountered some non-identifier characters where a parameter should be.
   ●Macro expansion too Long Macro expansion cannot exceed 4096 characters.
   ●Main must have a return type of int。 Function main has special requirements, one of which is that it cannot be declared with a non-int return type.
   ●May compile only one file when an output file name is given。
   You selected the -o command-line option, which permits only one output file name. Therefore only the first file is compiled and the others are ignored.
   ●Member member is initialized more than once.
   In a C++ class constructor, the initializer list after the constructor header includes the same field more than once.
   ●Member functions can only have static storage class.The only storage-class specifier that can be used for member functions is static.
   ●Misplaced break.
   The compiler encountered a break statement outside a switch statement or loop structure.
   ●Misplaced continue. The compiler encountered a continue statement outside a loop structure.
   ●Misplaced decimal pointThe compiler encountered a decimal point in the exponent part of a floating-point constant.
   ●Misplaced elif directive.
   The compiler encountered an #elif directive, but there was no matching #if, #ifdef, or #ifndef directive for it.
   ●Misplaced else.
   The compiler encountered an else statement but there was no matching if statement for it. This may be caused by an extra else statement, or by an extra comma, a missing brace, or a statement error in a preceding if statement.
   ●Misplaced else directive.The compiler encountered an #else directive without any matching #if, #ifdef, or #ifndef directive.
   ●Misplaced endif directive.The compiler encountered an #endif directive without any matching #if, #ifdef, or #ifndef directive.
   ●Multiple base classes require explicit class names.In a C++ stream constructor, if this class has more than one direct base class, every base-class constructor call in its constructor header must include the base-class name.
   ●Multiple declaration for identifier.This identifier has illegally been declared more than once. This may be due to conflicting declarations like int a; double a;, or a function declared twice in different ways, or a label declared repeatedly in the same function, or repeated declarations of something other than an extern function or simple variable.
   ●Multiple scope qualifiers.A C++ identifier is qualified by more than one class name, but at most one class name can qualify an identifier.
   ●Must take address of memory location.In the source file, the address operator (& was used on an expression such as a register, to which the address operator cannot be applied.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 5 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●Need an identifier to declare.
   An identifier is expected here to complete this declaration. This may be because a typedef has no name, or there is an extra semicolon at file level, or a class name has improperly been used as another kind of identifier.
   ●new and delete not supported.The new or delete operators are not supported in integrated debugger expression evaluation.
   ●No: following the ?
   In an expression, the question mark (?) and colon ( operators do not match. The colon may be missing, or there may be wrong nesting of parentheses or missing parentheses.
   ●No base class to initialize.
   The constructor of this C++ class tried to implicitly call a base-class constructor, but the declaration of this class has no base class. Check your declaration.
   ●No body defined for this inline function.This C++ function is declared inline, but has no function body. The body of an inline function is generally placed in the same header file as the function declaration, whether it is a member function or an ordinary inline function.
   ●No constructor parameters allowed for array of class.When you declare an array of a C++ class, no parameters may be passed to the class constructor. Only a no-argument constructor (default constructor) can be used to construct each element of the array.
   ●No file name ending. In an #include statement, the file name is missing the required quote mark or angle bracket.
   ●No file name given.No file name was given on the command line of the Turbo C++ command-line compiler (TCC); a source file name should be specified.
   ●No matching.The left and right parentheses do not match. Check the parentheses in the expression.
   ●Nonportable pointer conversion.An implicit conversion is needed between a pointer and an integer, but their type sizes are different, so it cannot be done without a cast. This conversion may not make much sense, so be explicit about what you want to do.
   ●Non__virtual functionfunctiondeclared pure.Only virtual functions can be declared pure, because derived classes must be able to hide them.
   ●Not an allowed type.Your source file declares some forbidden type, such as a function returning a function or returning an array.
   ●Not a valid expression format type.In evaluation or in a display window, an invalid format specifier follows the expression. A valid format specifier is an optional repeat value followed by a format character (c,d,f[n], h, x, m, p, r, or s).
   ●No type information.This variable has no type information during debugging. The module may have been compiled with the debugging switch off, or built by another compiler or assembler.
   ●Numeric constant too large.Character and string escape sequences greater than hexadecimal \XFF or octal \377 cannot be generated. Double-byte character constants can be represented with a second backslash. For example, \XOD\XOA represents a double-byte constant, and the digit string following the escape sequence can be separated like this:
   printf(“\XOD”“12345”);
   This will print 12345 after a carriage return
   ●Object must be initialized.This C++ object is declared const, but has not been initialized. It must be initialized at the point of declaration; otherwise no value can be assigned to it.
   ●Only one of a set of overloaded functions can be function.C++ functions are overloaded by default, and the compiler gives each function a new name. If you want to hide the new name assigned by the compiler with the declaration of function function, you can hide one of the functions in this set with the same name (otherwise the linker will find more than one global function with the same name).
   ●Operand expected.In the current expression evaluation, the compiler has run out of operands for all operators. Check whether there are extra operators (+,*,/, etc.) or a missing variable name.
   ●Operands are of differing or in compatible type.The left and right sides of a binary operator (+,/,==, etc.) cannot be combined in this way (types are incompatible).
   ●Operator[]missing.The overloaded C++ operator operator[] has been declared as operato[, so you must add the ] or correct this declaration.
   ●Operator→ must return a pointer or a class.The overloaded C++ operator function operator→ must be declared to return either a class or a pointer to a class, structure, or union. In either case, it must be an object to which the operator → can apply.
   ●Operator cannot be applied to these operand types.The left and right operands of a binary operator (+,-,==) are not legal types for this operator, for example if you try to add two arrays.
   ●Operator delete must a single parameter of type void*.This overloaded delete operator has been declared in some other way.
   ●Operator delete must return void.This overloaded delete operator has been declared in some other way.
   ●Operator new must have an initial parameter of type size.Operator new may be declared with any number of parameters, but it must have at least one parameter representing the size of the space to be allocated (generally the first parameter is required to be of type sizet).
   ●Operator new must have a single parameter of type size
   ●Operator new must return an object of type void*.This overloaded new operator has been declared in some other way.●Other objects cannot be declared in a function definition.After a function body, other declarations cannot be added to the same list separated by commas. For example:
   int f (), j; / *declaration of function f, and j also of int type* /
   int f (){return o;},j;/ *function f is defined here, comma is illegal* /
   ●Overlays only supported in medium, large and huge memory models.Overlays are supported only in medium, large, and huge memory models.
   ●Overloadable operator expected.Most C++ operators can be overloaded. But the field-selection operators ··* and :: and the conditional expression ? * * cannot be overloaded. The preprocessor operators # and ## are neither C nor C++ operators, so they cannot be overloaded either. Of course punctuation such as the semicolon cannot be overloaded.
   ●Overloaded function is not allowed here.When you change the access protection of a base-class member in a derived class, that member cannot be an overloaded function.
   ●Overloaded function resolution not supported.In integrated debugger expression evaluation, overloaded functions and operators cannot be resolved, even if there is an address.
   ●Parameterparametermissing nameIn a function definition header, this parameter has only a type declaration and no parameter name. This is illegal in C, but allowed in C++, except that the parameter cannot be referred to in the function.
   ●Parmeter names are used only with a function body.
   When declaring a function (rather than defining one with a function body), you must use empty parentheses or a function prototype; only a list of parameter names is not allowed. The following are examples of function declarations:
   int func(); /*declaration without prototype, legal*/
   int func (int ,int );/*function prototype declaration, legal*/
   int func (int i, int j);/*parameter names in a prototype, legal*/
   int func (i, j);/*only parameter names, illegal*/
   ●Pointer required on left side of→Only a pointer is allowed on the left side of the arrow →.
   ●Pointer to a static member cannot be created.
   C++ member pointers can only be created for ordinary data and function members. You cannot create a member pointer to a static member.
   ●Previously specified default argument value cannot be changed
   When one parameter of a C++ function has been declared with a default value, that value cannot be changed or omitted in other declarations of the same function●Pure function functionnot overridden in classA pure virtual function can neither be hidden (given a new declaration) nor redeclared as pure in a derived class.
   ●Reference membermemberis not initializedA reference must be initialized. A class member of reference type must be given an initial value in all constructors of that class. This means you cannot rely on the compiler to generate constructors for such a class, because it cannot know how to initialize such a reference.
   ●Reference membermemberneeds a temporaty for initializationThe user provided an initializing value for a reference type, but that value is not an lvalue of reference type. The compiler would have to generate a temporary for the initialization, but there is obviously no place to store that temporary here, so the initialization is illegal.
   ●Register is the only storage class allowedThe only storage-class specifier allowed for function parameters is register.
   ●Repeat count needs an lvalueIn the watch or evaluation window, the expression before the comma must be an operable storage location (an lvalue). For example, the following expressions are invalid:
   i++, 10d
   x=y, 10m
   ●Right side of 。* is not a member pointer
   The right side of the C++ 。* operator must be a pointer to a class member, and that class is the one indicated on the left side of this operator. Here the right side is not a member pointer.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 6 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●Side effects are not allowed
   In the watch window, operations with side effects such as assignment, ++, or -- are not allowed. A common error is writing x=y when testing whether x and y are equal with x==y, and this is not allowed.
   ●Size of identifier is unknown or zero
   This identifier is used in a place where its size must be known. For example, a structure name may only have been declared but not defined, or an extern array may have no size declaration. Certain references to such items (such as sizeof) or indirect pointer references to this type are illegal; you must rearrange your declarations to obtain the size of this identifier.
   ●Sizeof may not be applied to a bit fieldsizeof returns the number of bytes in a data object. This does not apply to a bit field.
   ●Sizeof may not be applied to a functionsizeof can only be used on data objects and not on functions; you can ask for the size of a pointer to a function.
   ●Size of the type is unknown or zeroThis type is used in a place where its size must be known. For example, a structure name may only have been declared but not defined. Certain references to such items (such as sizeof) or indirect pointer references to this type are illegal; you must rearrange your declarations to obtain the size of this type.
   ●Size of this expression is unknown or zeroThis expression involves a type or variable of unknown size, and it is used in a place where its size must be known. For example, a structure may only have been declared but not defined, or an extern array may have no size declaration. Certain references to such items (such as sizeof) or indirect pointer references to this type are illegal. Rearrange your declarations to obtain the size.
   ●Statement is required here.Certain parts of a C or C++ program require a statement (even if it is only a semicolon). It may be placed between a label and the end of the block in which it appears, or after an if, do, while, or for statement.
   ●Statement missing;The compiler encountered an expression statement not followed by a semicolon.
   ●Static and union members cannot require initialization.A class that has a constructor or any virtual function, or a class derived from such a class, must be initialized. Static data members of a class cannot be initialized, and therefore also cannot be of a type that requires this kind of initialization.
   ●Storage classstorage class not allowed for a field.In C, a storage-class specifier is not allowed in a field declaration. In C++, a field may be a typedef type, a data field may be static, and a function field may be inline; beyond that it is not allowed.
   ●Storage classstorage class not allowed for a functiou.In C and C++, a function may be extern or static. In C++, a function may also be inline. Beyond that it is not allowed, and only one storage class may appear.
   ●Storage classstorage classis not allowed hereThis storage class is not allowed here. Possibly two storage classes were declared, while only one may be declared.
   ●Structure size too large.Your source file declares a structure larger than 64K.
   ●Subscripting missing ]The compiler encountered a subscript expression missing a closing bracket ]. This may be due to a missing or extra operator, or mismatched parentheses.
   ●Switch selection expression must be of integral typeThe value of the selection expression inside the parentheses of a swith statement must be of an integral type (char, short, int, long, enum). You can use an explicit cast to meet this requirement.
   ●Switch statement missing .(In a switch statement, the compiler did not find a left parenthesis “(” after the keyword switch●Switch statement missing )In a switch statement, the compiler did not find a right parenthesis “)” after the test expression.
   ●thiscan only be used within a member functionIn C++, the reserved word this can only be used in class member functions.
   ●Too few parameters in callWhen calling a function with a function prototype through a function pointer, the number of arguments is too small. The prototype gives all parameters.
   ●Too few parameters in call to functionToo few arguments in a call to a named function declared with a prototype.
   ●Too many decimal pointsThe compiler encountered a floating-point constant with more than one decimal point.
   ●Too many default casesThe compiler encountered more than one default statement in a switch statement.
   ●Too many error or warning messagesThere can be at most 255 errors and warnings before compilation stops.
   ●Too many exponentsThe compiler encountered more than one exponent in a floating-point constant.
   ●Too many initializersThe compiler encountered more initializers than are needed for the object declared.
   ●Too many storage classes in declarationA declaration cannot contain more than one storage-class specifier.
   ●Too many types in declarationA declaration cannot contain more than one basic type: char, int, float, double, struct, union, enum, or a typedef name.
   ●Too much global data defined in fileThe total of global data declarations cannot exceed 64K bytes. Check any array declarations that may be too large. If all declarations are necessary, consider reorganizing the program or using far variables.
   ●Trying to derive a far class from a near baseIf a type is declared (or defaults to) near, all derived classes should also be near
   ●Trying to derive a near class from a far baseIf a type is declared (or defaults to) far, all derived classes should also be far.
   ●Two consecutive dotsAn ellipsis is three dots (…), a decimal point or member-selection operator is one dot (·). In a C program, two consecutive dots are illegal.
   ●Two operands must evaluate to the same typeIn the conditional expression operator (?, the types of the expressions on the two sides of the colon should be the same, except for common conversions such as char to int, float to doubl, or void* to a particular pointer. In this kind of expression, evaluating the two sides of different types will not be automatically converted; this may be an error, or it may simply require casting one side to the type of the other.
   ●Type mismatch in parameternumberWhen calling a function declared with a prototype through a function pointer, the given argument number (counted from left to right starting at 1) cannot be converted to the declared parameter type.
   ●Type mismatch is parameternumberin call to functionYour source file declares a named function with a prototype, and the given argument number (counted from left to right starting at 1) cannot be converted to the declared parameter type.
   ●Type mismatch in parameterparameterYour source file declares a function with a prototype and calls it through a function pointer, and the named parameter cannot be converted to the declared parameter type.
   ●Type mismatch in parameterparameterin call to functionThe source file declares a named function with a prototype, and the named parameter cannot be converted to the declared parameter type.
   ●Type mismatch in rede claration of identifierThe source file redeclares a previously declared variable with a different type. This may happen when a function is called, but a later declaration says it returns a non-integer type. If so, you must declare the function before its first call.
   ●Type name expected
   The following situations may produce this error:
   ·When declaring a file-level variable or a static field, neither a type name nor a storage class is used.
   ·A typedef declaration gives no type for the name.
   ·When declaring a destructor for a C++ class, the destructor is not a type name (it should be the same as its class name).
   ·The supplied C++ base-class name is not a class name.
   ●Type qualifier identifier must be a struct or class name.In quall::identifier, the C++ qualified name is not the name of a struct or class.
   ●Unable to create output file filename.This error is caused by a full working disk or write protection. If the working disk is full, delete unnecessary files and recompile. If it is write-protected, move the source file to a writable disk and recompile. This error may also be caused by the output directory not existing.
   ●Unable to create turboc$InBecause the disk cannot be accessed or the disk is full, the compiler cannot create the temporary file TURBOC$LN
   ●Unable to execute commandcommandTLINK or TASM was not found, or the disk may be bad.
   ●Unable to open include file filenameThe compiler cannot find this named file. This may also be because an #include file includes the source file itself, or because FILES was not set in CONFIG.SYS at your root directory (you can try FILES=20). Check whether the named file exists.
   ●Unable to open input file filenameThis error occurs when the source file cannot be found. Check whether the file name is misspelled, or whether the file is on the correct drive or in the correct directory.
   ●Undefined label identifierThere is a label for a goto transfer in the function, but the label has no definition.
   ●Undefined structure structureSomewhere in the source file before the compiler reported this error, the named structure was used (usually with a pointer to a structure), but there was no definition for this structure. This error may be caused by a misspelled structure name or a missing declaration.
   ●Undefind symbol identifierThis named identifier has not been declared. This may be due to a spelling error here or at the declaration, or there may have been an error when declaring the identifier.
   ●Unexpected}An extra right brace “}” was encountered where it was not expected. Check whether a left brace “{” is missing.
   ●Unexpected)--check for matching parenthesisAn extra right parenthesis “)” was encountered where it was not expected. Check whether a left parenthesis “(” is missing.
   ●Unexpected: foundAn extra colon was encountered where it was not expected. Check whether a question mark ? is missing.
   ●Unexpected end of file in comment started on line numberThe source program ended in the middle of a comment. This is usually caused by a missing comment terminator (* /).
   ●Unexpected end of file in conditional started on line nemberThe source file ended before compilation reached #endif. Possibly #endif is missing or misspelled.
   ●Union cannot have a base typeGenerally speaking, a C++ class can be of union type, but such a class cannot be derived from another class.
   ●Union members cannot require initializationBecause the lifetime of a union member is uncertain, it is illegal to declare a union member that requires initialization with certain types.
   ●Unknown language,must be c or c++In a C++ structure:
   extern name type func(/*…*/):
   the name in quotes must be C or C++; names of other languages are not recognized. You can declare an external Pascal function without having the compiler rename it as follows:
   extern“c"int pascal func {/*…*/}
   A C++ function (which can be overloaded) may be declared as Pascal and allowed to be renamed by the compiler (to allow overloading) in the following form:
   extern int pascal func{/ *…* /}
   ●Unknown preprocessor directive:identifierAt the beginning of a line, the compiler encountered the character #, but the directive name following # is not one of the following: define, undef, line, if, ifdef, ifndef, include, else, or endif.
   ●Unterminated string or character constantAfter the beginning of a string or character constant, the compiler did not find the closing quote.
   ●Use.or→to call functionYou tried to call a member function without providing an object.
   ●Use::to take the address of a member functionIf f is a member function of class c, you can use &c::f to take its address. Note that the class name is used here, not the object name, and :: separates the class name and function name (a pointer to a member function is not a real pointer type, and it does not point to any particular instance).
   ●Use; to terminate declarationsThis declaration is not terminated by a comma or semicolon.
   ●User break
   In the integrated environment, when compiling or linking you pressed Ctrl-Break (this is not an error, just a confirmation).
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 7 Posted 2003-01-04 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
●Value of type void is not allowed.
   A value of type Void has no value at all, so it cannot appear where an actual value is required, including the right side of an assignment statement, a function argument, and the control expression of an if, for, or while statement.
   ●Variable identifieris initialized twice.This variable is initialized more than once. Declaring a file-level variable multiple times is legal, but it can only be initialized once; even if the two initializations are the same, it is still illegal.
   ●Variable name expected.When using the address operator (&, or when C++ returns a reference to an object, an actual object must be provided. Usually this is a variable name. In this case, the compiler was asked to take the address of an inappropriate object.
   ●Vectors of classes must use the default constructor.When initializing a vector (array) of a class, you must use a constructor with no arguments, called the default constructor. That is to say, when initializing such an array, do not provide constructor arguments.
   ●Virtual function function1 conflicts withfunction2.A virtual function has the same parameter types as a virtual function in the base class, but a different return type, which is illegal.
   ●Virtual specified more than once。The C++ reserved word virtual can appear only once in a member function declaration.
   ●Void & is not a valid type.A reference to something with no value is obviously an illegal kind of type. This error is usually found before you use this reference type or try to initialize it.
   ●While statement missing(.In a while statement, there is no left parenthesis “(” after the keyword while.
   ●While statement missing).There is no right parenthesis “)” after the test expression of the while statement.
   ●Wrong number of arguments in call of macro.The source file calls a named macro with the wrong number of arguments.
   3. Warnings
   ●function1hides virtual function function2A virtual function in a base class is normally hidden by a declaration in a derived class. In this case, a declaration with the same name but different parameter types will make the virtual function inaccessible in further derived classes.
   ●identifier is declared as both external and staticAn identifier is implicitly or explicitly declared as global or external, and at the same time declared static. That identifier is then treated as static. You should check all declarations of that identifier.
   ●identifierdeclared but never usedThe block in which this variable is declared in the source file has just ended, but the variable was never used. This warning indicates that the compiler encountered the closing brace of a compound statement or function. The declaration of the variable is at the beginning of the compound statement or function.
   ●identifieris assigned a value that is never usedAfter being assigned a value, this identifier is never used elsewhere in the function. This warning is only given when the compiler encounters the end of a block.
   ●identifieris both a structure tag and a name, now obsoleteIn C, it is completely legal for an identifier to be used both as a structure tag name and as a variable or typedef name.
   For example:struct s {int i,j;}s; or typedef structs {int i, j;} s;is correct in C, but inappropriate in C++.
   ●Ambiguous operators need parenthesesThis warning means that parentheses were not added when using two shift operations, relational or bitwise logical operations at the same time, or when addition/subtraction operations and shift operations are mixed without parentheses. Programmers often confuse the precedence of these operators.
   ●Assigningtype to enumerationAssigning an integer value to an enum type is usually an error, but it has been reduced to a warning to give existing programs a chance to run.
   ●Assignment to this is obsolete,use X:perator new insteadIn early versions of C++, there was only one way to control allocation for an object class, namely by assigning to the this parameter inside the constructor. But this usage is no longer encouraged, because there is a better, safer, and more general technique to replace it, namely defining a member function operator new.
   ●Base initialization without a class name is now obsoleteIn early versions of C++, initialization of a base class was done by placing only the base-class constructor argument list after the constructor header. Now it is recommended to include the base-class name.The new method makes the code clearer, and it must be used when there are multiple base classes.
   Old format:
   derived::derived(int i)i,10) {…}
   New format:
   derived::derived(int i):base(i,10) {…}
   ●Bit fields must be signed or unsigned itIn Turbo C++, bit fields must be declared as signed or unsigned integer types. In ANSIC, bit fields can only be signed or unsigned int types (not char or long and such).
   ●Both return and return with a value usedIn one function, some return statements return a value while some do not. Although this is legal in C, it is usually an error. Possibly a return statement is missing at the end of the function.
   ●Call to function with no prototypeA function prototype should be given before calling the function. Note that to get this message, the warning Prototypes required must be turned on.
   ●Call to function function with no prototypeSame as the previous message.
   ●Code has no effectThe compiler encountered a piece of code that is useless. For example, the statement a+b;
   has no effect on either variable. This operation is unnecessary and may be an error.
   ●Constant is long
   The compiler encountered a decimal constant greater than 32767, or an octal (or hexadecimal) constant greater than 65535, but the constant is not followed by the letter l or L. The compiler will treat the constant as a long integer.
   ●Constant member member is not initializedThe constant member member contained in a C++ class is not initialized. Note that a constant member can only be initialized and cannot be assigned a value.
   ●Constant out of range in comparisonIn a comparison operation, a constant subexpression exceeds the range allowed by the type of the other subexpression. For example, comparing an unsigned quantity with -1 is meaningless. To get an unsigned constant greater than 32767 (decimal), you can write the constant as unsigned (for example, (unsigned)65535) or add the suffix u or U after the constant. When this happens, the compiler will still generate code for the comparison operation, even though that code will always get the same result when finished (for example, comparing an expression of type char with 4000).
   ●Conversion may lose significant digits For an assignment operation or other situation, your source program needs to convert from long or unsigned long to int or unsigned int type. Because variables of int type and long type have different lengths, this conversion may change the execution of a program.
   ●Declaration does not specify a tag or an identifierA declaration statement does not declare anything. Usually this means that in a structure or union declaration, neither a tag name nor a variable is given.
   Some early C compilers allowed the following declaration:
   struct {int a; int b; };
   They even allowed a and b to be used as ordinary fields of some variable: expressions like x。b were allowed, even if x was not of structure type. This usage is now discouraged, but this warning can help you find such cases.
   ●Declare function prior to use in prototypeA function prototype refers to a structure type that has not yet been declared. The declaration inside the prototype and the declaration outside the prototype are different, for example:
   int func (struct s * ps);
   struct s {/ *... */};
   Because there is no structure s in the scope of the func prototype, the type of parameter ps is a pointer to an undefined structure s, which is different from the structure s declared later. This will later cause warnings and errors about incompatible types. To solve this problem, you can move the declaration of structure s before any prototype that refers to it, or give a complete definition when declaring struct s. If a function parameter is a struct rather than a pointer to a struct, an incomplete declaration is not enough; the complete declaration of the structure must be given before the prototype.
   ●Division by zeroDivisor is 0.
   ●Functions containing reserved word are not expanded inlineFunctions containing any of the following reserved words
   do while switch continue
   for gotobreakcase
   cannot be expanded inline, even if the function is specified as inline. The function is still completely legal, but it will be treated as an ordinary static (non-global) function. Therefore a copy of the function will appear in each compilation unit that calls it.
   ●Function should return a valueA function is declared with a return type other than int and void, but the function's return statement returns no value.
   ●Hexadecimal value contains more than 3 digitIn early versions of C, a hexadecimal escape sequence could not contain more than three digits. But the new ANSI standard allows any number of digits, as long as the value is within the byte range. This warning is caused by an escape sequence beginning with multiple 0s (for example, “\x00045”).
   ●Ill-formed pragmaAfter pragma there is no matching directive that Turbo C++ can recognize.
   ●Initialization is only partially bracketedWhen initializing a structure, braces may be used to enclose the initializer of each structure member; if a member is itself an array or structure, nested braces may be used. Only in this way can you ensure that each member gets the intended value.
   ●Initialization with inappropriate typeA variable of enum type is initialized with a value of a different type. For example, the following declaration enum count {zero, one, two} x=2; will cause this warning, because 2 is of int type rather than enum count type. When assigning or initializing a variable of enum type, it is better to use an enum identifier instead of an integer literal (for example, use two instead of 2.)
   ●Initializing identifier with typeAn attempt was made to initialize an enum variable with a different type. Usually this indicates an error; it was changed to a warning only to give existing programs a chance to run.
   ●Mixing pointers to signed and unsigned charWithout explicitly using a cast, an attempt was made to change a char pointer to an unsigned char pointer, or vice versa (strictly speaking this is incorrect, but on the 8086 CPU it is usually harmless).
   ●No declaration for function functionThis message is given if a function is called without first declaring it. In C, a function can be declared in the form “int fun ()” without giving a prototype. In C++, every function declaration is a prototype; this example is equivalent to “ int fun (void)”.
   ●Non-const function function called for const objectA non-const member function is called by a const object. This is an error, but it has been made a warning so that existing programs can run.
   ●Nonportable pointer comparisonAn attempt was made to compare a pointer with a non-pointer value (other than the constant zero). If the comparison is correct, a cast may be used to eliminate this warning.
   ●Nonportable pointer conversionA nonzero integer value is used where a pointer or integer quantity is expected. Integer types and pointers are the same size. If you really want to do this, please explicitly give a cast.
   ●Obsolete syntax; use ::insteadIn early versions of C++, a period (。) or a colon ( was used in a declaration or definition to separate a member name from its class name. This syntax is no longer used, and has been replaced by a double colon (:.Old syntax:
   void myclass.func(int i){/ *···* /}
   New syntax:
   void myclass::func(int i){/ *···* /}
   ●Overload in now unnecessary and obsoleteIn early C++ versions, the reserved word oveload was used to mark overloaded function names. Modern C++ uses a “full type linkage” scheme, and all functions can be overloaded without any extra marking, so overload is no longer used.
   ●Parameterparameter is never usedA function parameter declared in a function is never used in the function body. This may or may not be an error; check whether a word was misspelled. In addition, if the parameter is redefined inside the function body as an automatic (local) variable, this will also cause this warning. In that case, the parameter is shadowed by the automatic variable, so it will not be used.
   ●Possible use of identifier before definitionAn uninitialized variable is used in an expression.
   ●Possibly incorrect assignmentWhen the compiler encounters a test expression (that is, the test expression in an if, while, or do-while statement) whose main operator is an assignment operator, it will generate this warning. To eliminate this warning, enclose the assignment expression in parentheses, then compare it with zero. For example, the following if statement:
   if (a=b)…
   should be changed to
   if (a=b)!=0)…
   ●Program flow can skip this initialization; try using{ }Initialization of a variable is controlled by an if statement, so it may be skipped. A pair of braces may be needed to enclose the block in order to control the scope of the variable.
   ●Redefinition of macro is not identicalIn the source file, a macro is redefined with content different from the original; the new content will replace the old content.
   ●Restarting compile using assemblyIf the compiler is started without the -B option on the command line and there is no #pragma inline statement in the source program, then when an asm statement is encountered the compiler will issue this warning and restart the compilation process in order to handle inline assembly language.
   ●Structure passed by valueIf the warning “passing structures by value” is enabled, then this warning will be produced whenever a structure is passed as a parameter by value. Most likely the address operator & was omitted when passing the structure parameter. Since structures can be passed by value, this omission is acceptable. This warning is only a warning mechanism provided by the compiler.
   ●Style of function definition is now obsoleteIn C++, the following old C function definition format is illegal:
   int func (p1,p2)
   int p1,p2;
   {/ *... * /}
   Other C++ compilers may also disallow this usage. ●Temporary used to initializeidentifier
   Temporary used for parameternumber in call to identifier
   Temporary used for parameterparameterin call to identifier
   Temporary used for parameter number
   Temporary used for parameterparameter
   In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type. If the types do not match, the actual value is assigned to a temporary object of the correct type, and then the address of this temporary object is assigned to the reference-type variable or parameter. This warning means that this reference-type variable or parameter does not point to the object you expected, but to a temporary variable. For example:
   f (int &; /*parameter is a reference to int * /
   char c;
   f (c);
   For calling function f with the address in C, the compiler generates equivalent C++ source code:
   int x=c, f(x);
   ●Undefined structure identifierA named structure or a pointer to a structure is used in the source file, but it has not been defined. This may be caused by a misspelled structure name or a missing declaration.
   ●Unknown assembler instructionThe compiler encountered an inline assembly statement with an illegal opcode. Check the spelling of the opcode. This warning is off by default.
   ●Unreachable codeAfter a break, continue, goto, or return statement, if what follows is not a label or the end of a loop or function, the compiler will use a constant test condition to check while, do, and for loops, trying to find places where the loop cannot be reached.
   ●Untyped bit field assumed signed intA bit field with no specified type will be assumed to be signed int. Some compilers instead assume the default is unsigned int. It is best to specify the type explicitly.
   ●Void functions may not return a valueThe source program declares the current function as returning void, but the compiler encountered a return statement with a value; the value of that return statement will be ignored.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Forum Jump: