This is a list of compiler error messages I have hit and the method used to clear them.
warning: comparison between pointer and integerMaybe OK. This was generated from 'if (strstr(line,"word") != NULL )' strstr returns NULL or pointers, I was only interested in the fact that a string had been found, not where it was.
`floppyto.c:782: parse error at end of inputfloppyto.c is the program name, 782 is the line number but it is one greater then the file length. This is because of unbalanced {} or unbalanced comments /* */
parse error before `printf'Missing ; before this statement.
Segmentation error.You have attempted to access protected storage or overwritten something important!
subscripted value is neither array nor pointerAttempted to subscript a scalar variable.
`j' undeclared (first use this function)Declare the variable.
/usr/lib/crt0.o: Undefined symbol _main referenced from text segmentGenerated when main() is missing. I have seen this twice.
Undefined symbol _initscr referenced from text segmentCalled a function but have not supplied it or the library that contains it with an #include statement.
unterminated `#if' conditional#endif preprocessor required.
warning: passing arg 1 of `cpystr' makes integer from pointer without a castThis is the code causing the problem:
void cpystr( char item); main() { char src[]="martin leslie"; cpystr(src); } cpystr(char item) { }It should be....
void cpystr( char item[]); main() { char src[]="martin leslie"; cpystr(src); } cpystr(char item[]) { }
conflicting types for `Alex' previous declaration of `Alex'Alex has been declared in two enum statements. Here is the code
parse error before `1' At top level: warning: data definition has no type or storage class parse error before string constant warning: data definition has no type or storage classThere is a conflict between enum and #define statements. Here is the code
Top | Master Index | Keywords | Functions |