By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,605 Members | 1,491 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,605 IT Pros & Developers. It's quick & easy.

polymorfism, inheritance

P: 1
Can anybody explain me what is the point in the following two technique. Which one is better and why

class B{
public:
void method(){}
};

//case1
class A : private B{
void test()
{
method();
}
};

case2
class A{
B m_b;
void test()
{
m_b.method();
}
};

thnx
Nov 10 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.