title: Defining an object without calling its constructor in C++
body: <p>In C++, I want to define an object as a member of a class like this:</p>
  
  <pre><code>Object myObject;
  </code></pre>
  
  <p>However doing this will try to call it's parameterless constructor, which doesn't exist. However I need the constructor to be called after the containing class has done some initialising. Something like this.</p>
  
  <pre><code>class Program
  {
  public:
     Object myObject; //Should not try to call the constructor or do any initializing
     Program()
     {
        ...
  
        //Now call the constructor
        myObject = Object(...);
     }
  
  }
  </code></pre>