title: C++ Error C2512: no appropriate default constructor available
body: <p>I have a class called <code>MainWindow</code> without a default constructor. I have a class called <code>Application</code>, its constructor uses an instance of <code>MainWindow</code> as a parameter. I get an </p>
  
  <pre><code> Error C2512, "no appropriate default constructor available" 
  </code></pre>
  
  <p>in the definition of the constructor from the class Application.</p>
  
  <p>Here's the code of the constructor:</p>
  
  <pre><code>Application::Application(HINSTANCE hInstance, MainWindow mainWindow) {...}
  </code></pre>
  
  <p>I'm creating the instance of <code>Application</code> like this:</p>
  
  <pre><code>MainWindow window(1000, 1000, false, "test");
  Application program(Instance, window);
  </code></pre>
  
  <p>Why do I get this error? I'm not trying to create a new instance of MainWindow with the default constructor.</p>