Re: [Dev-C++] Question about Classes: Public vs. Private.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Wobien <roo...@pl...> - 2007-11-29 14:44:34
|
Which book do you mean? The interface of a class to the clients is defined by the declaration of the public members, and what the public members are supposed to do. You can change the implementation of the public members without changing the interface to the clients, but not their declaration. If you make functions and data members private you can change their declaration without changing the interface. Wobien ----- Original Message ----- From: rus...@ao... To: dev...@li... Sent: Thursday, November 29, 2007 3:12 PM Subject: [Dev-C++] Question about Classes: Public vs. Private. I'm a bit confused on the private vs public aspects of member data. The book states that by making it private clients won't need to worry about how it's stored or computed (p. 120). However doesn't that same premise hold true for the public members as well? What are the advantages of private member data? Thanks, Russ More new features than ever. Check out the new AOL Mail! ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |