- 1

Multiple classes C++

I am doing a project and I have 3classes, I have an issue : how can use the instance of a class in another one. For example I want to read from file in one class, in the other one I want to use it. Please let me know if my question is not very clear. Thanks

4th Feb 2019, 12:39 PM
Olga Mohan
Olga Mohan - avatar
4 Réponses
+ 1
If you know the concept of inheritance than you do that https://www.sololearn.com/learn/CPlusPlus/1907/ If you don't understand from here than go to newboston channel on YouTube
4th Feb 2019, 12:42 PM
Saad Saleem
Saad Saleem - avatar
+ 1
Thanks for your answer. I am kind of familiar with inheritance but wanted to solve without using inheritance. I am not sure if that is possible. I saw some examples about how to use other classes instances, but they didn't say to much to me. Thanks
4th Feb 2019, 12:47 PM
Olga Mohan
Olga Mohan - avatar
4th Feb 2019, 1:14 PM
Dennis
Dennis - avatar
0
Thank you!
6th Feb 2019, 10:42 PM
Olga Mohan
Olga Mohan - avatar