Original Post
You know when you have those days, where you cant remember for the life of you something once so very simple! Well it would appear that my brain cells have abandoned me and I'm having one of those days. If I have a BaseObject class with a private member variable say int m_ID; and then I have an inherited class 'Inherited: public BaseObject' If In any of my 'Inherited' functions I try to reference m_ID i am greeted with 'Cannot access private member variable defined in BaseObject' which would surely mean either make it public (surely breaking the rules of oop) or redefining it in Inherited, i.e also give 'Inherited' a private int m_ID; My question is will this work, and do what i want it to do? or am i talking nonsense. If I then had an accessor function in my BaseObject like virtual int GetId( void ) { return m_ID;} would that return the right value ? i.e 'Inherited's' m_ID or am i being stupid? Thanks in advance! Chris