Suppose I have two classes Class A
and Class B
.
class A {
uint32 A_1;
uint32 A_2;
uint32 A_3;
uint32 A_4;
}
First Question: How can I make the class members of class A that is uint_32 A_1, A_2, A_3, A_4
visible to an object created from class B?
// Object Created from Class B is below:
Object_B = new Class B();
My Syntax for making Class A class members visible to Class B is below for first question:
Class A(Class B *);
Second Question: How can I access those class members (uint_32 A_1, A_2, A_3, A_4
) of Class A through the object I created that is: Object_B
?
Below is the syntax for second question:
Object_B->A_1;
Are the above syntax for two classes correct?
Also, please provide me some good links for class, object in C++ so that I can read through deeply.