Re: Querry aoubt struct including character strings pointer



Nick Keighley said:

<snip>

You cannot modify string constants.

s/cannot/must not/

This, as Nick already knows, is one of those situations where the C
language places a demand on the programmer rather than on the
implementation. Complying with that demand is, therefore, a matter of
self-discipline rather than implementation-imposed discipline. When
programmers ignore such demands, very often they get away with it. But
sometimes, they don't.

It's almost like driving on the wrong side of the road. If you live in a
relatively traffic-free area, you can actually drive on the wrong side of
the road for quite extended periods - but you only have yourself to blame
when you wrap yourself round a Mini Metro, with quite possibly fatal
consequences.

(It's not *quite* the same, because the police will enforce the law if they
happen to spot you. If you live anywhere near me, the chances of that are
pretty low, since the bobbies around here seem utterly incapable of
distinguishing their seating arrangements from their arm joints.
Nevertheless, the point stands.)

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: portability and return
    ... why don't you create it if you think there is a demand? ... Presumably you'd be willing to moderate it. ... Nick Keighley ...
    (comp.lang.c)
  • Re: "STL from the Ground Up"
    ... I'll shall be investigating those languages soon. ... That's when the programmer needs to be able to get the ... counting fails to collect cycles and leaks memory and even "conservative" ...
    (comp.programming)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... come in here and create their own reality by bullying people. ... As a professional programmer who abandoned C after assisting a Nobel ... professionalism to conduct libelous campaigns against two computer ...
    (comp.programming)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... An incredible example of poor sportsmanship ... that a competent C++ programmer would have chosen a better one. ...
    (comp.programming)
  • Re: A lurkers take on C.L.C pedantry
    ... It's for discussing the C language. ... DEAD groups won't be singing the praises of eclipse. ... programmer in that he likes to dress everything up in obscure rhetoric ...
    (comp.lang.c)

Loading