C (169/301)

From:Ben Hutchings
Date:28 Aug 99 at 00:30:57
Subject:Re: Re: ExecBase & 'RESET:starting PC' exception

From: Ben Hutchings <womble@zzumbouk.demon.co.uk>

On Sat, Aug 28, 1999 at 12:44:33AM +0100, Andrew Markwell wrote:
> From: Andrew Markwell <andrewmarkwell@ukonline.co.uk>
>
> On 27-Aug-99 did write:
> > From: Ben Hutchings <womble@zzumbouk.demon.co.uk>
> >
> > On Fri, Aug 27, 1999 at 12:42:39AM +0100, Andrew Markwell wrote:
> >> From: Andrew Markwell <andrewmarkwell@ukonline.co.uk>
> >>
> >> On 27-Aug-99 did write:
> >> From: Ben Hutchings <womble@zzumbouk.demon.co.uk>
<snip>
> >>> You should use const char * here, not char *.
> >>>
> >> er, why?
> >
> > String literals are arrays of const char.
> >
> First I've heard of it.

You doubt what I say? Perhaps you should find some decent
documentation on standard C or C++.

For hysterical raisins, you are allowed to assign string literals to
objects of type char *. That's just a special case; it doesn't mean
that they are really arrays of char.



Ben Hutchings - womble@zzumbouk.demon.co.uk, http://www.zzumbouk.demon.co.uk
Team *AMIGA* | Jay Miner Society | Linux - the choice of a GNU generation
For every complex problem there is a solution
that is simple, neat, and wrong.