Programming Tutorials

Comment on Tutorial - Public versus Private members in C++ By Baski



Comment Added by : peter

Comment Added at : 2011-07-20 13:13:44

Comment on Tutorial : Public versus Private members in C++ By Baski
Very good.
But is this (Accessor functions enable you to separate the details of how the data is stored from how it is used. This enables you to change how the data is stored without having to rewrite functions that use the data.) the only thing that we cannot refer to private member through a statement like this:
Cat Boots;
Boots.itsAge=5; // error! can't access private data!


View Tutorial