title: Creating an instance of a class with ()
body: <p>I have a question : what constructor is used when you create an instance of a class with <code>ClassName instance()</code> in C++ ?</p>
  
  <p>Example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class Test
  {
  private:
      Test()
      {
          cout &lt;&lt; "AAA" &lt;&lt; endl;
      }
  
  public:
      Test(string str)
      {
          cout &lt;&lt; "String = " &lt;&lt; str &lt;&lt; endl;
      }
  };
  
  int main()
  {
      Test instance_1(); // instance_1 is created... using which constructor ?
      Test instance_2("hello !"); // Ok
  
      return 0;
  }
  </code></pre>
  
  <p>Thanks !</p>