pointer increment
Tom Karzes
karzes at mfci.UUCP
Thu Aug 17 05:12:22 AEST 1989
In article <829 at ruso.UUCP> wolfgang at ruso.UUCP (Wolfgang Deifel) writes:
>dkonerding at eagle.wesleyan.edu writes:
>If you want to increment ptr only by one you should use a cast.
>
> ((char*)ptr)++ ;
This is not legal C, since a cast expression is not a valid LHS. You can
no more use this than you can use:
((char *) ptr) = ...;
Some compilers may accept this, but it isn't legal C.
More information about the Comp.lang.c
mailing list