Hello,
Lets say i have 3 classes called class1, class2 and class3. Class1 has a method which returns a value, in class2 there's a pointer variable to class1(lets say class1* c1) and in class3 there's a class2 type variable(class2 c2). I would like to access the method from class1 through class3. I've tried c2.c1->method(), which doesnt work because the variables are private. Is there any other way to doing this besides simply making c1 public ?
Thanks in advance