Search

8.5b — Non-static member initialization

When writing a class that has multiple constructors (which is most of them), having to specify default values for all members in each constructor results in redundant code. If you update the default value for a member, you need to touch each constructor.

Starting with C++11, it’s possible to give normal class member variables (those . . . → Read More: 8.5b — Non-static member initialization

Eight C++ programming mistakes the compiler won’t catch

C++ is a complex language, full of subtle traps for the unwary. There is an almost infinite number of ways to screw things up. Fortunately, modern compilers are pretty good at detecting a large number of these cases and notifying the programmer via compile errors or warnings. Ultimately, any error that is compiler-detectable becomes . . . → Read More: Eight C++ programming mistakes the compiler won’t catch

6 ways to write better code

There was an article linked from Digg posted up a couple days ago entitled “6 ways to write better code”. It’s pretty good advice (for the most part), so I thought I’d link it here.

http://www.ibm.com/developerworks/linux/library/l-clear-code/index.html?ca=drs-

Here are the recommendations of the author, along with my own comments: 1) Comment like a smart person.

I . . . → Read More: 6 ways to write better code