Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get ip address & hostname? Pin
hahyojin20-Feb-01 20:08
hahyojin20-Feb-01 20:08 
AnswerRe: How to get ip address & hostname? Pin
Rene D20-Feb-01 20:16
Rene D20-Feb-01 20:16 
GeneralRe: How to get ip address & hostname? Pin
hahyojin20-Feb-01 20:38
hahyojin20-Feb-01 20:38 
GeneralRe: How to get ip address & hostname? Pin
Halid Niyaz25-Jan-02 2:41
Halid Niyaz25-Jan-02 2:41 
GeneralObject Orientated Nightmare Pin
Brendan Tregear20-Feb-01 14:03
Brendan Tregear20-Feb-01 14:03 
GeneralRe: Object Orientated Nightmare Pin
20-Feb-01 15:39
suss20-Feb-01 15:39 
GeneralRe: Object Orientated Nightmare Pin
l a u r e n20-Feb-01 23:13
l a u r e n20-Feb-01 23:13 
GeneralRe: Object Orientated Nightmare Pin
Erik Funkenbusch21-Feb-01 12:59
Erik Funkenbusch21-Feb-01 12:59 
Well, this is where the STL comes in handy. There are some nice little algorithms for finding data within collections, without the need for complex iteration statements.

Additionally, unless the objects can be NULL, you should use references instead of pointers, this will reduce the possibility of pointer errors.

There are lots of solutions to your problem. For instance, you might have a member of your Document called GetPatient, which will do much of the looking up of the data for you, instead of requiring you to do it everytime you need it.

You can also create helper functions (not everything has to be a member of a class to be Object Oriented) that takes an object and does something with it. For instance, you might have a function called GetLastPatientVisitData(CPatient& patient) that returns the data you need.


GeneralRe: Object Orientated Nightmare Pin
Mr Morden21-Feb-01 19:32
Mr Morden21-Feb-01 19:32 
GeneralRe: Object Orientated Nightmare Pin
Mr Morden21-Feb-01 19:38
Mr Morden21-Feb-01 19:38 
GeneralCListBox Pin
Vickie20-Feb-01 7:52
Vickie20-Feb-01 7:52 
GeneralRe: CListBox Pin
20-Feb-01 8:12
suss20-Feb-01 8:12 
Generalextracting numbers from CString Pin
20-Feb-01 7:20
suss20-Feb-01 7:20 
GeneralRe: extracting numbers from CString Pin
l a u r e n20-Feb-01 23:08
l a u r e n20-Feb-01 23:08 
QuestionImplementing waitable timers with timeouts ? Pin
20-Feb-01 0:28
suss20-Feb-01 0:28 
AnswerRe: Implementing waitable timers with timeouts ? Pin
l a u r e n20-Feb-01 1:24
l a u r e n20-Feb-01 1:24 
AnswerRe: Implementing waitable timers with timeouts ? Pin
Erik Funkenbusch21-Feb-01 13:02
Erik Funkenbusch21-Feb-01 13:02 
GeneralProperty pages get PSN_KILLACTIVE when edit control changed Pin
Dave Midgley19-Feb-01 22:59
Dave Midgley19-Feb-01 22:59 
GeneralADO Recordset not showing changes just made... Pin
Paul Wolfensberger19-Feb-01 15:34
Paul Wolfensberger19-Feb-01 15:34 
GeneralRe: ADO Recordset not showing changes just made... Pin
l a u r e n19-Feb-01 20:27
l a u r e n19-Feb-01 20:27 
GeneralRe: ADO Recordset not showing changes just made... Pin
Paul Wolfensberger20-Feb-01 2:48
Paul Wolfensberger20-Feb-01 2:48 
GeneralRe: ADO Recordset not showing changes just made... Pin
John M. Drescher20-Feb-01 18:19
John M. Drescher20-Feb-01 18:19 
QuestionHow to enable the second monitor by using APIs? Pin
Wang Huaizhi19-Feb-01 14:08
Wang Huaizhi19-Feb-01 14:08 
QuestionHow to get process name from Process Id/Handle? Pin
19-Feb-01 11:14
suss19-Feb-01 11:14 
AnswerRe: How to get process name from Process Id/Handle? Pin
Todd Wilson19-Feb-01 12:56
Todd Wilson19-Feb-01 12:56 

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.