I have a class called MenuItem which holds the information for a menu item in an owner-draw menu. Some methods are to be called on all the items, so I created a class called MenuVector which calls the "global" methods on each MenuItem. Since MenuVector is a container is inherits from the STL vector. MenuItem has some static variables. I realised that these static variables are essentially "global" to all MenuItems, and therefore should belong as memebers of MenuVector. Furthermore it might in the future be desireable to have MenuVector perform operations on these variables. However making them members of MenuVector means that MenuItem no longer has access to them, which it needs. I do not want to amke these members accessible outside of MenuItem and MenuVector so as to preserve information hiding. I originally thought of making MenuItem a friend of MenuVector. However I don't want to do this as I might not be able to port the application to other languages in the future. What is the proper OO way to share data with an encapsulated class?