My error
gridlist.h: In constructor ‘GridList::GridList(WINDOW*, int, int, int, int, int)’:
gridlist.h:11:47: error: no matching function for call to ‘Window::Wi
Your GridList
class has a member variable of type Window
. Since all members are (default if unspecified) initialized before the body of the constructor, yours looks similar to this in reality:
GridList::GridList (...)
: Window(...), m_tendMenu() //<--here's the problem you can't see
Your member variable is being default initialized, but your Window
class has no default constructor, hence the problem. To fix it, initialize your member variable in your member initializers:
GridList::GridList (...)
: Window(...), m_tendMenu(more ...), //other members would be good here, too
The reason your Button
class works is because it doesn't have a member of type Window
, and thus, nothing being default-initialized when it can't be.