Documentation for gtkmm HelloWorld example explanation differs from provided code.
Reference: Hello World in gtkmm
Page introduces user to gtkmm. The "HelloWorld" example contains a description, with code, that differs from the actual source code. Differing code in documentation can cause confusion for new users.
Provided source code contains the following code in the main application source file (main.cc)
int main(int argc, char* argv[])
{
auto app = Gtk::Application::create("org.gtkmm.example");
//Shows the window and returns when it is closed.
return app->make_window_and_run<HelloWorld>(argc, argv);
}
However, later on the same page, the description for how code functions shows the follow:
int main(int argc, char* argv[])
{
auto app = Gtk::Application::create("org.gtkmm.example");
HelloWorld helloworld;
return app->run(helloworld, argc, argv);
}
If the code from the description of function is used, compiler complains that run
function prototype accepts either 0 or two arguments.