Archive

Posts Tagged ‘object initializer constructor’

C++ Function Try Blocks

November 14, 2008 msujaws 1 comment

Will it compile?

That is the question for this post. Suppose you have a class definition and constructor with an object initializer list like the following:

class CObject
{
   CFoo foo;
   CBar bar;
};

CObject::CObject() : foo(2), bar(3) {}

Read more…