-
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)%
-
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.