+ 2

How do you use the same object in different classes in C++

How do you use the same object in different classes in C++

15th May 2021, 11:15 PM
titan
2 Respuestas
+ 2
I'm sorry, I don't understand what you're trying to say here. Can you maybe give an example of what you want to do?
16th May 2021, 3:35 AM
XXX
XXX - avatar
0
titan Make a method and call that method in different classes. That is why we have method in classes. You can call that method by creating object of the class. Suppose you have two class A and B and class A has a method method1() So now create an instance of class A in class B and call class A method in Class B using the instance of class A.
16th May 2021, 5:24 AM
A͢J
A͢J - avatar