I have a question is there any possible way to use objects in classes, for example if I had a class called example.h and example.cpp and declared a object in main how would i use that object in my class. If there is a obvious explanation for this I'm sorry I've been using C++ for over 6 months now but don't get object-oriented programming. Are there any good tutorials on OOP out there?
please let me know.
Thanks for reminding that we can use pointer / reference as well.
In the example code, the private member m_ctrl gets initialized with the object ctrl. However, any subsequent changes to the member m_ctrl (from class member functions) shall not result in a corresponding change in the variable ctrl, or will it?