From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-06-25T20:59:04+09:00 Subject: Re: protect parents from children On Wed, 25 Jun 2003 21:41:17 +0900, ts wrote: >>>>>> "S" == Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> writes: > > S> Is it possible to make the variable readonly to the child ? > > I still don't know what is a child, and what you want to do > > [snip code] I have seen that example before..But I cannot use it. In C++ private members is inacessable to derivatived classes. I want the same, but with a extra twist. Instances declared in the parent should be readonly(frozen) to the subclass. So that the subclass (B): * is allowed to read the variable. * is disallowed to write to the variable (raise exception). -- Simon Strandgaard