c++ - binary '=': no operator found which takes a right-hand operand of type "Button *" -
I have a menu class that is a singleton, now it's going to be three button objects, m_load, m_save, m_new . I'm calling their creators in an Init () method like this:
Zero Menu :: Init () {Menu :: m_Load = new button (L "../ data / PNG / load .png "); Menu :: MISAV = New Button (L. ../ data / PNG / Save Page "); Menu :: m_New = new button (L. ../ data / png / new.png "); }
and they are defined in the menu
class menu in the menu.h file: Public Singleton & lt; Menu & gt; {Buddy Class Singleton & lt; Menu & gt; // Cutting Private: Menu (); Button m_load; Button m_Save; Button M_Newen; };
The compiler described in the Init method header is giving error. How are you trying to assign an indicator to a button in a button?
button * m_Load;
Comments
Post a Comment