Article View: comp.std.c
Article #3928Re: Placement of string literals
From: John Winters
Date: Tue, 05 Sep 1995 18:43
Date: Tue, 05 Sep 1995 18:43
25 lines
1093 bytes
1093 bytes
In article <1995Sep4.123536.3152@dcs.warwick.ac.uk>,
Zefram <A.Main@dcs.warwick.ac.uk> wrote:
>
>To look at it another way, the two definitions above could be
>reimplemented as:
>
>const char __foo[] = {'H','e','l','l','o',' ','w','o','r','l','d','\0'};
>char *foo;
>foo = (char *) __foo;
>
>const char __bar[] = {'H','e','l','l','o',' ','w','o','r','l','d','\0'};
>const char *bar;
>bar = (const char *) __bar;
Or indeed, as :
const char __foo[] = {'H','e','l','l','o',' ','w','o','r','l','d','\0'};
char *foo;
const char *bar;
foo = (char *) __foo;
bar = (const char *) __foo;
John
--
John Winters. Wallingford, Oxon, England.
Technical Details
Message-ID:
<DEG3zz.66q@polo.demon.co.uk>Path:
arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!polo!johnReferences:
<42c4uu$9e5@sparcserver.lrz-muenchen.de> <1995Sep4.123536.3152@dcs.warwick.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!polo!john From: john@polo.demon.co.uk (John Winters) Newsgroups: comp.std.c Subject: Re: Placement of string literals Date: Tue, 5 Sep 1995 18:43:10 GMT Organization: Wallingford Message-ID: <DEG3zz.66q@polo.demon.co.uk> References: <42c4uu$9e5@sparcserver.lrz-muenchen.de> <1995Sep4.123536.3152@dcs.warwick.ac.uk> Keywords: string literals, const X-NNTP-Posting-Host: polo.demon.co.uk