hi, i'm trying to learn c++, but i can not find if it's possible to extend a class in this way:
main.cc
#include "mWindow.h"
using namespace std;
int main( int argc, char* argv[] ) {
gtk_init( &argc, &argv );
mWindow win = mWindow();
gtk_main();
return 0;
}
mWindow.cc
#include "mWindow.h"
mWindow::mWindow() {
gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (this, "my window");
gtk_widget_show_all (GTK_WIDGET(this));
}
mWindow.h
#ifndef MWINDOW_H_INCLUDED
#define MWINDOW_H_INCLUDED
#include <gtk/gtk.h>
using namespace std;
class mWindow : public GtkWindow {
public:
mWindow();
};
#endif