c++ - Derived Class Constructor Syntax Wt -


hello fellow c++programmers,

today tinkering around excellent wt framework wt - c++ library developing web applications: http://www.webtoolkit.eu/wt.

slowly steadily i'm making progress. 1 thing made me curious (i'm pretty new c++) following expression in constructor of class derived basic wt::wcontainerwidget class:

class foowidget : public wt::wcontainerwidget {   public:   foowidget(wt::wcontainerwidget *parent = 0);   ...    private:   ... };  foowidget::foowidget(wt::wcontainerwidget *parent = 0) : wt::wcontainerwidget(parent) {   ... }; 

note: in wt widgets placed in hierarchical tree optional parent argument specifies widget contain our "newborn" widget.

what happening in ": wt::wcontainerwidget(parent)" part? know expressions behind ":" in constructor used initialize member variables doesn't seem make sense here because it's class name, not name of member ... missing important?

many in advance , regards,

julian

this part of initialization list:

: wt::wcontainerwidget(parent) 

it calling base class(wt::wcontainerwidget) constructor argument parent. can read thread more details.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -