Hi everyone!

Just looking at a C++ test for revision.

Several statements are provided regarding C++ classes and I am asked which one is true. I've narrowed it down to two answers:

1 - Whether specified or not, all C++ classes implicilty inherit from class object.

2 - A pointer to an object can only be used to access its class's private member functions if the pointer is in a member or friend function

But am unsure which one is correct, my thoughts are:

1 - I've never heard of this but I read that all .net classes inherit from system.object. I think this is only for VC++ though and so not correct.

2 - Sounds correct to me... but am a little unclear with the wording of the question.


Any thoughts anyone?

Thanks!