const char*

Bjoern Kriews bjoern at drdhh.hanse.de
Wed May 8 05:28:44 AEST 1991


>From article <4278 at rwthinf.UUCP>, by berg at marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg):
> main(){char*a;
>  strcpy(a,"Hello there!");
>  *findblank(a)='.';
>  puts(a);
>  return 0;}
> ---------------------------------------------
> The compiler issues a warning for trying to return a (const char*), which
> should have been a (char*).  

Some compilers will also produce a warning about using 'a' without having
assigned any value to it. :-)

(Yes I know, that's not the point and I'm sure you wouldn't write such
 things in real code, but I just couldn't resist...)
 
Greetings, Bjoern

---
bjoern at drdhh.hanse.de = Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / FRG
"gaaga mahwe Bjoern urgl ufzae Turbo-C bnub"     (J. Willamowius)



More information about the Comp.std.c mailing list