title: How to pass argument in a singleton
body: <p>I've been wondering how to pass argument to a singleton contructor. I already know how to do a singleton, but I've been unlucky to find a way to do it.</p>
  
  <p>Here is my code (part of it).</p>
  
  <pre><code>Questionnary* Questionnary::getInstance(){
  
      static Questionnary *questionnary = NULL;
  
      if(questionnary == NULL){
          cout &lt;&lt; "Object created";
          questionnary = new Questionnary();
  
      }
      else if(questionnary != NULL){
          cout &lt;&lt; "Object exist";
      }
  
      return questionnary;
  }
  
  Questionnary::Questionnary(){
      cout &lt;&lt; "I am an object";
  }
  
  //This is want i want to acheive
  Questionnary::Questionnary(string name){
      cout &lt;&lt; "My name is &lt;&lt; name;
  }
  </code></pre>
  
  <p>Many thanks in advance</p>
  
  <p>(BTW i know how and <strong>why</strong> a singleton is bad)</p>