const char*
Norman Diamond
diamond at jit533.swstokyo.dec.com
Mon May 13 10:44:27 AEST 1991
In article <1742 at targon.UUCP> andre at targon.UUCP (Andre van Dalen) writes:
>Does this mean that you can transform a const char * by calling a function?
>char * un_const (const char *p) { return (char *)p; }
>const char *read_only;
>char *foo = un_const(read_only);
Sure, but why bother coding a function? You can just say:
char *foo = (char *) read_only;
--
Norman Diamond diamond at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Permission is granted to feel this signature, but not to look at it.
More information about the Comp.std.c
mailing list