What are some C++ related idioms, misconceptions, and gotchas that you\'ve learnt from experience?
An example:
class A
{
public:
char s[1024];
cha
I've liked this since the time i've discovered it in some code:
assert(condition || !"Something has gone wrong!");
or if you don't have a condition at hand, you can just do
assert(!"Something has gone wrong!");
The following is attributed to @Josh (see comments). It uses the comma operator instead:
assert(("Something has gone wrong!", condition));