title: C++ no instance of constructor matches the argument list e0289
body: <p>So the code should work, but it is not. How can I fix it?
  <a href="https://i.stack.imgur.com/ooWvX.png" rel="nofollow noreferrer">enter image description here</a></p>
  <pre><code>    #include &lt;iostream&gt;
  
  class Button{
  private:
      unsigned width; 
      unsigned height;
  
  public:
  
      Button(): width(0), height(0){};
  
      Button(unsigned _width, unsigned _height): 
          width(_width), height(_height){};
  
      unsigned getWidth(){ return width; };
  
      unsigned getHeight(){ return height; };
  
      void setWidth(unsigned _width){ width = _width; };
  
      void setHeight(unsigned _height){ height = _height; }; 
  
  };
  
  class Window{
  protected:
      Button button;
  
      int x;
      int y;
  
  public:
  
      Window(){
          x = y = 0;
      }
  
      Window(int _x, int _y, Button _button):
          x(_x), y(_y), button(_button){};
      
      ~Window(){
          x = 0;
          y = 0;
      }
  
  };
  
  class Menu: public Window{
  private:
      char *title;
  
  public:
      Menu() = default;
  
      Menu(char* _title, int _x, int _y, Button _button):
          title(_title), Window(_x, _y, _button){
              std::cout &lt;&lt; &quot;Menu has been created.&quot; &lt;&lt; std::endl;
          };
      
      ~Menu(){
          title = NULL;
          std::cout &lt;&lt; &quot;Menu has been deleted.&quot; &lt;&lt; std::endl;
      }
  
      friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, Menu&amp; menu){
          os &lt;&lt; &quot;Button \&quot;&quot; &lt;&lt; menu.title &lt;&lt; &quot;\&quot; on (&quot; &lt;&lt; menu.x &lt;&lt; &quot;,&quot; &lt;&lt; menu.y &lt;&lt; &quot;) with size &quot; &lt;&lt; menu.button.getWidth() &lt;&lt; &quot;x&quot; &lt;&lt; menu.button.getHeight() &lt;&lt; &quot;.&quot;;
          return os;  
      } 
      
  };
  
  
  int main(){
  
      Button button(10, 10);
  
      Menu menu(&quot;A main menu&quot;, 5, 5, button);
  
      std::cout &lt;&lt; menu &lt;&lt; std::endl;
  
      return 0;
  
  }
  </code></pre>