so I have two classes, let's say class A and class B. In class B's constructor I create an object of type A(private). In class A I have a member function that displays the content of A, void displayA().
Now i run int main(), I create an object of type B(ideally also object of type A stored in B). My question is how do i use the method in A through B?
I tried objB.displayA(), but that obviously didn't work. Do I need to create a member function in B that calls member function in A? Or is there a more elegant solution