--- Indika Bandara <[EMAIL PROTECTED]> wrote:

> consider following
> class Base
> {
> protected:
> int ID;
> }
> class Derived : public Base;
> 
> 
> 
> what i want is when somebody inherits base he has to
> set 'ID' to a
> specific value. This should be guarenteed whenever
> somebody inherits
> Base.Methods i can think of is
> - ID is a reference. so it should be initialized in
> constructor, but
> the problem is in Derived the constructor
> initializer list doesn't
> have access to protected member ID??
> how can this be accomplished?
> 
> 
If ID is protected in the base then it should be
accessable in the derived.

Ray


       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

Reply via email to