I guess I'm not understanding something about C++:
I have this code:
#include "window.h"
int main(int argc, char* argv[]) {
Gtk::Main kit(argc, argv);
window win();
Gtk::Main::run(win);
return EXIT_SUCCESS;
}
'window' is a class that inherits from Gtk::Window with an empty constructor. When I try to compile this code, I get this error:
no matching function for call to ‘Gtk::Main::run(window (&)())
However, if I change the line:
window win();
to
window win;
then the code compiles. How do the presence/absence of the parentheses change things? I've run into this before and never understood what was going on. What's happening?