Hi,
I have one questions.
How to properly pass both private and public variables/functions from one class to another?
thank you
baxy
Hi,
I have one questions.
How to properly pass both private and public variables/functions from one class to another?
thank you
baxy
The same way you pass any other objects - as parameters to functions. Do you have a specific example that's causing you trouble? Post some code, and you'll get better help.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
true. I was not specific enough
Code:class A{ publis: private: protected: }; class B:public A:private A : protected A {} // is this the proper construct if I would like to include all (protected, private and public things form class A)??
PS
sorry for waisting time on inadequat, and not properly formated posts
My first suggestion would be to try it.
You'll find that it doesn't compile. A class can only be inherited once. The protection level of the inheritance determines what protection level other code sees. For example, if B inherits A privately, only B will be able to access A's members, when referenced through an object of type B. Derivatives of B will not be able to see them, nor will non-member code. The other protection levels follow in the expected ways.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?