In reality if your application design requires you to access c then you must create an accessor function or make the accessing function a friend. But if the class design prevents it then you will have to negotiate with the class designer; perhaps he can suggest an alternative design that doesn't require you to access the private data.