4 ms·
Here I was hoping for a true mind-stretching puzzle to start the day/week, and all I get is a rehash of things every C++ programmer should already know. Is it
by npsimons 14y ago
Here I was hoping for a true mind-stretching puzzle to start the day/week, and all I get is a rehash of things every C++ programmer should already know.
Is it something that catches people off guard the first time they experience it? Yes. Does it not "make sense" to those who don't understand how C++ compilers work and (more importantly) why they work that way? Yes.
As another poster said, this is already explained in "Effective C++", as well as "Thinking in C++", and like TFA mentions the spec has it too. Yes, we all know C++ is crufty; that's why they invented Java. But it's powerful and it's flexible, and sometimes it's all we've got, so it's best if you learn to use it properly if you're going to use it.