I'm new to C++, and have experience with other programmas languages, but I have a question: How can I access a list from a sub class, from the parent?
Here is my layout: TutorialApp.cpp with function TutorialApp::update() In that function I want to access the list mParticles2y from another class that list is made in: ParticleController.cpp, like this:
std::list<int> mParticles2y;
I've tried accessing the list like this [in TutorialApp]:
mParticleController.mParticles2y.size()
[to get it's size]
but that gives me this error:
call of an object of a class type without appropriate operator
So I dont really know where to go from here...
PS: I use mParticleController because that is state in my script:
ParticleController mParticleController;
I hope this is enough info.
PS: I'm not really sure this is called a class, or child, I use these terms because I know them from ActionScript [which works with classes in a similar way]