Sujet : Re: relearning C: why does an in-place change to a char* segfault?
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 14. Aug 2024, 15:33:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9if6v$fs3n$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
Tim Rentsch <
tr.17687@z991.linuxsc.com> writes:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>
Just as 1 is an integer literal whose value cannot be modified,
[...]
>
The C language doesn't have integer literals. C has string
literals, and compound literals, and it has integer constants.
But C does not have integer literals.
True, but C++ does, and it means the same thing by "integer literal"
that C means by "integer constant". C doesn't define the term "integer
literal" with any conflicting meaning, and my use of the C++ terminology
allowed me to make the parallel with string literals clearer, so I don't
see any particular problem with my choice of words.