title: C++ class initialisation containing class variable initialization
body: <p>I noticed some code of a colleague today that initialized class variables in the initialization.  However it was causing a warning, he says because of the order they are in.  My question is why is it better to do variable initialization where it currently is and not within the curly brackets?</p>
  
  <pre><code>DiagramScene::DiagramScene( int slideNo, QRectF screenRect, MainWindow* parent )
      : QGraphicsScene( screenRect, parent ),
      myParent( parent ), 
      slideUndoImageCurrentIndex(-1),
      nextGroupID(0),
      m_undoInProgress(false),
      m_deleteItemOnNextUndo(0)
      line(0),
      path(0)
  {
      /* Setup default brush for background */
      scDetail-&gt;bgBrush.setStyle(Qt::SolidPattern);
      scDetail-&gt;bgBrush.setColor(Qt::white);
      setBackgroundBrush(scDetail-&gt;bgBrush);
  
  }
  </code></pre>