title: What is the difference between MyRectangle mr = MyRectangle(); and MyRectangle mr2 ();
body: <p>I notice the former enters the constructor I made even if the constructor has no arguments while the latter only enters the constructor I made only if it requires arguments.</p>
  
  <p><strong>WIN</strong></p>
  
  <pre><code>// ConsoleApplication11.cpp : Defines the entry point for the console application.
  //
  
  #include "stdafx.h"
  #include "iostream"
  #include "string"
  
  using namespace std;
  
  
  class myRectangle {
      int width;
      public:
          int getWith();
          void setWidth(int newWidth) {width = newWidth;};
          myRectangle (int);
          ~myRectangle ();
  };
  myRectangle::myRectangle (int w) {
      width = w;
      cout &lt;&lt; "myRectangel Constructor\n";
  }
  
  myRectangle::~myRectangle() {
      cout &lt;&lt; "destructor\n";
  }
  
  void runObject();
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      runObject();
      int exit; cout &lt;&lt; "\n\n"; 
      cin &gt;&gt; exit;
      return 0;
  }
  
  void runObject() 
  {
      myRectangle mr (5);
  }
  </code></pre>
  
  <p><strong>FAIL</strong>
      // ConsoleApplication11.cpp : Defines the entry point for the console application.
      //</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream"
  #include "string"
  
  using namespace std;
  
  
  class myRectangle {
      int width;
      public:
          int getWith();
          void setWidth(int newWidth) {width = newWidth;};
          myRectangle ();
          ~myRectangle ();
  };
  myRectangle::myRectangle () {
      cout &lt;&lt; "myRectangel Constructor\n";
  }
  
  myRectangle::~myRectangle() {
      cout &lt;&lt; "destructor\n";
  }
  
  void runObject();
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      runObject();
      int exit; cout &lt;&lt; "\n\n"; 
      cin &gt;&gt; exit;
      return 0;
  }
  
  void runObject() 
  {
      myRectangle mr ();
  }
  </code></pre>