these are the errors

This is a discussion on these are the errors within the C Programming forums, part of the General Programming Boards category; cc-1069 cc: WARNING File = lab8.c, Line = 9 Integer conversion resulted in truncation. ' ','f','i','r','s','t',' ','b','u','f','f','e','r','/0'}; ^ cc-1178 cc: ...

  1. #1
    Unregistered
    Guest

    these are the errors

    cc-1069 cc: WARNING File = lab8.c, Line = 9
    Integer conversion resulted in truncation.

    ' ','f','i','r','s','t',' ','b','u','f','f','e','r','/0'};
    ^

    cc-1178 cc: WARNING File = lab8.c, Line = 27
    Argument is incompatible with the corresponding format string conversion.

    printf("%s", *pbuffer);
    ^

    cc-3316 cc: ERROR File = lab8.c, Line = 32
    The expression must be a pointer to a complete object type.

    reverse [buffer3];
    ^

    cc-1031 cc: ERROR File = lab8.c, Line = 32
    An integral expression is needed.

    reverse [buffer3];
    ^

    cc-1018 cc: ERROR File = lab8.c, Line = 45
    An unmatched left parentheses "(" appears in an expression.

    while(*plast !'\0')
    ^

    cc-1029 cc: ERROR File = lab8.c, Line = 60
    An expression is expected at this point.

    return char *A;
    ^

    4 errors detected in the compilation of "lab8.c".
    (50)%

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    1) ,'/0'};

    This is incorrect if you want a NULL. This is incorrect for two reasons:

    a) You don't need to implicity set the null.
    b) This is not NULL. This is: '\0' (you have the wrong slash).

    2) printf("%s", *pbuffer);

    Unless 'pbuffer' is a pointer to a pointer, this is incorrect. Remove the '*'.

    3 and 4) Not enough code to tell.

    5) while(*plast !'\0')

    This probably should be "while( *plast != '\0' )", but it suggests that elsewhere you're missing a prenthesis...

    6) return char *A;

    What are you trying to do? Type cast this? Return the letter 'A', or what?

    return (char *) A; //typecast a return character pointer from a variable named 'A'.
    return 'A'; // return the letter 'A'

    It's too hard to say at this point what you're trying to do...

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 04:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 11:50 AM
  3. Unknown Errors in simple program
    By neandrake in forum C++ Programming
    Replies: 16
    Last Post: 04-06-2004, 03:57 PM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. errors in class(urgent)
    By ayesha in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2001, 06:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21