[EMAIL PROTECTED] wrote:
class Base{
   private:
      int i;
      char* c;
   public:
      Base(const int, const char*);
      ...
};
class Derive : virtual public Base{
   private:
      ...
   public:
      Derive(const int x, const char* y){ pass_vars_to_base_class

(x,y);}
   ...
};

The class above shows something I want to do, to pass some values to
the parent class. Can someone please tell me how to do this?

Thanks folks!


Initializer list.

Derive::Derive (const int x, const char* y)
    : Base(x, y)
{
}
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to