🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2875

Re: const char*

#2875
From: Bjoern Kriews
Date: Tue, 07 May 1991 19:28
21 lines
1135 bytes
From article <4278@rwthinf.UUCP>, by berg@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@drdhh.hanse.de = Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / FRG
"gaaga mahwe Bjoern urgl ufzae Turbo-C bnub"     (J. Willamowius)
Technical Details
Message-ID: <3096.05.91@drdhh.hanse.de>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!uunet!mcsun!unido!mcshh!abqhh!drdhh!bjoern
References: <4278@rwthinf.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!uunet!mcsun!unido!mcshh!abqhh!drdhh!bjoern
From: bjoern@drdhh.hanse.de (Bjoern Kriews)
Newsgroups: comp.std.c
Subject: Re: const char*
Message-ID: <3096.05.91@drdhh.hanse.de>
Date: 7 May 91 19:28:44 GMT
References: <4278@rwthinf.UUCP>
Organization: Digital Island
Lines: 21