J
jblazi
Let us assume, I have to classes A and B:
class A {
"type" x;
};
and
class B {
A a[30];
};
Now if x and a are private and I want to access x having an instance of B,
I have to write something like
B.get_A(i).get_x()
where the member functions "get_A(int i)" in B and "get_x()" in A are to
be defined.
Is there a possibility that is less clumsy?
TIA,
jb
class A {
"type" x;
};
and
class B {
A a[30];
};
Now if x and a are private and I want to access x having an instance of B,
I have to write something like
B.get_A(i).get_x()
where the member functions "get_A(int i)" in B and "get_x()" in A are to
be defined.
Is there a possibility that is less clumsy?
TIA,
jb