title: Telescoping constructor
body: <p>From  Effective Java 2ed Item 2:</p>
  
  <blockquote>
    <p>telescoping constructor pattern, in which you provide a constructor
    with only the required parameters, another with a single optional
    parameter, a third with two optional parameters, and so on,
    culminating in a constructor with all the optional parameter</p>
  </blockquote>
  
  <p>Can I do the same in C++? I tried somthing like this:</p>
  
  <pre><code>MyClass::MyClass(QWidget *parent)
  {   
      MyClass(NULL, NULL, NULL, parent);
  }
  
  MyClass::MyClass(QString title, QWidget *parent) 
  {
  
      MyClass(title, NULL, NULL, parent);
  }
  
  MyClass::MyClass(QString title, QString rightButton, QWidget *parent)
  {
  
  
      MyClass(title, NULL, rightButton, parent);
  }
  
  
  
  MyClass::MyClass(QString titleLabel, QString leftButtonLabel, QString rightButtonLabel, QWidget *parent)
  : QWidget(parent)
  {
        // construct the object
  }
  </code></pre>
  
  <p>but it does not work. Any hint?</p>
  
  <p>I am really new in C++ field so.. sorry for the newbee question</p>