I am new to C++ and GTKMM. I copied the code from a GTKMM for Beginners PDF and this 'Hello World' program requires a header file and 2 source code file which
are main.cc (the one that should be compiled) and helloworld.cc
Below is the main.cc code
I compile it with g++ running on Kubuntu Linux. But I got this message:
1 2 3 4
main.cc: In function ‘int main(int, char**)’:
main.cc:10:30: error: expected primary-expression before ‘)’ token
Gtk::Main::run(HelloWorld);
^
Please help! No matter what I do that annoying error message won't get off.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <gtkmm/main.h>
#include "helloworld.h"
int main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
HelloWorld helloworld;
//Shows the window and returns when it is closed.
Gtk::Main::run(helloworld);
return 0;
}
Please excuse my bad English. I don't write in English as often as you people did.