Can I modify a constant variable through a pointer obtained from const_cast?

O

Old Wolf

Andre Kostur said:
JKop said:
It seems to me that C++ makes too many allowances for C's
faults. For instance:

char* blah = "JKop";
blah[2] = 't';

Undefined behaviour. But we wouldn't have this problem in
the first place if that didn't compile.

The next "version" of C++ should be "C++ without the C
bullshit".

You're in the wrong place for that argument. You want to be over in
comp.std.c++

Argh, now we will have to put up with his junk in that newsgroup too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top