-
Compiler error
Code:
$ g++ -c -lX11 -I /usr/include/cairo -lcairo src/TopLevelWindow.cpp
src/TopLevelWindow.cpp: In constructor ‘TopLevelWindow::TopLevelWindow(Application*, Dimension, std::string)’:
src/TopLevelWindow.cpp:3: error: no matching function for call to ‘Widget::Widget()’
src/Widget.h:18: note: candidates are: Widget::Widget(Widget*, Dimension, Dimension)
src/Widget.h:9: note: Widget::Widget(const Widget&)
I'm not quite sure what this means, but it looks to me that it's complaining that TopLevelWindow doesn't have the same constructors as its base class. How do I fix this?
-
Probably because you are trying to make a Widget variable without to initialize it with don't with don't have a default constructor. Look up initialization lists