Home

> Made a crucial mistake in my post. I meant my question to be:
>
> Is there any other way of doing this without *de-protecting* the
> constructors and not making the class abstract?
>


You can write:

class B
{
public :
B(){}

protected:
~B(){}
};

class A
{
friend B::B();

public:
A(){}
~A(){}
};

normal users won't be able to create an object of class B and B::B()
has access to all class A members.

previous
next

RE: Almost There - os.kill()
Re: How can I know how much to read from a subprocess
Re: remove list elements..
Re: Assertion in list comprehension
Re: Nested class templates and incomplete type error
Kidprotect
Akogo
Fundacja Hobbit
Fundacja Iskierka
Pajacyk