Lies in education [was Re: The "loop and a half"]

Neil Cerutti neilc at norwich.edu
Thu Oct 12 09:56:31 EDT 2017


On 2017-10-12, Marko Rauhamaa <marko at pacujo.net> wrote:
> Bill <BILL_NOSPAM at whoknows.net>:
>
>> Marko Rauhamaa wrote:
>>> One example is the surprising fact that string literals in C
>>> are "char *" and not "const char *".
>>
>> If not, you couldn't pass a string literal to a function
>> having prototype void f(char *s);
>
> That *ought* to be prevented. That's the whole point.

I'm far less experienced in C, but I threw up my hands and
stopped bothering with const qualifiers in C due to such
headaches. When in Rome, program without const qualifiers in C.

-- 
Neil Cerutti




More information about the Python-list mailing list