Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: is this good practice? Pin
Christian Graus26-Feb-02 10:54
protectorChristian Graus26-Feb-02 10:54 
GeneralRe: is this good practice? Pin
Maximilien26-Feb-02 11:01
Maximilien26-Feb-02 11:01 
GeneralRe: is this good practice? Pin
Michael Dunn26-Feb-02 11:41
sitebuilderMichael Dunn26-Feb-02 11:41 
GeneralRe: is this good practice? Pin
Carlos Antollini26-Feb-02 10:31
Carlos Antollini26-Feb-02 10:31 
AnswerRe: is this good practice? Pin
Jon Hulatt27-Feb-02 1:04
Jon Hulatt27-Feb-02 1:04 
GeneralRe: is this good practice? Pin
Bill Wilson27-Feb-02 8:05
Bill Wilson27-Feb-02 8:05 
GeneralRe: is this good practice? Pin
Roman Nurik27-Feb-02 9:43
Roman Nurik27-Feb-02 9:43 
AnswerRe: is this good practice? Pin
Stan Shannon27-Feb-02 1:29
Stan Shannon27-Feb-02 1:29 
One very crucial aspect of doing Object oriented programming is the concept of data encapsulation. If your member variables are public they are not encapsulated. Making them public out of convenience starts a process of laziness which ends with every declared object made public to the entire application and every member of every object is therefore a global public variable. This defeats the entire purpose of OO design.

I have sadly been required to work on many applications which fell victem to this very process. Don't do it. Please.

Take the time to properly encapsulate and manage your data. The time you will ultimately save yourself and others (like me) will be well worth the extra effort upfront.


"There's a slew of slip 'twixt cup and lip"
GeneralOpenGl opening files Pin
Nnamdi Onyeyiri26-Feb-02 10:08
Nnamdi Onyeyiri26-Feb-02 10:08 
GeneralAuto-complete file combo Pin
Chris Losinger26-Feb-02 8:52
professionalChris Losinger26-Feb-02 8:52 
GeneralRe: Auto-complete file combo Pin
Michael Dunn26-Feb-02 11:42
sitebuilderMichael Dunn26-Feb-02 11:42 
GeneralRe: Auto-complete file combo Pin
Chris Losinger26-Feb-02 12:24
professionalChris Losinger26-Feb-02 12:24 
Generalnevermind... Pin
Chris Losinger26-Feb-02 13:44
professionalChris Losinger26-Feb-02 13:44 
GeneralGlobalAddAtom and RegisterHotKey Pin
26-Feb-02 8:41
suss26-Feb-02 8:41 
GeneralRe: GlobalAddAtom and RegisterHotKey Pin
Carlos Antollini26-Feb-02 9:03
Carlos Antollini26-Feb-02 9:03 
GeneralGlobal Variables Pin
Rajveer26-Feb-02 8:35
Rajveer26-Feb-02 8:35 
GeneralRe: Global Variables Pin
Chris Losinger26-Feb-02 8:34
professionalChris Losinger26-Feb-02 8:34 
GeneralRe: Global Variables Pin
Nemanja Trifunovic26-Feb-02 8:39
Nemanja Trifunovic26-Feb-02 8:39 
GeneralRe: Global Variables Pin
Carlos Antollini26-Feb-02 8:40
Carlos Antollini26-Feb-02 8:40 
GeneralRe: Global Variables Pin
Christian Graus26-Feb-02 10:56
protectorChristian Graus26-Feb-02 10:56 
GeneralRe: Global Variables Pin
Nemanja Trifunovic26-Feb-02 11:06
Nemanja Trifunovic26-Feb-02 11:06 
GeneralRe: Global Variables Pin
Christian Graus26-Feb-02 11:08
protectorChristian Graus26-Feb-02 11:08 
GeneralRe: Global Variables Pin
Nemanja Trifunovic26-Feb-02 11:28
Nemanja Trifunovic26-Feb-02 11:28 
GeneralMouse tracker Pin
alex.barylski26-Feb-02 7:45
alex.barylski26-Feb-02 7:45 
GeneralRe: Mouse tracker Pin
Chris Losinger26-Feb-02 8:06
professionalChris Losinger26-Feb-02 8:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.