Click here to Skip to main content
15,917,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Close External Programs Pin
Gary R. Wheeler4-Apr-03 14:18
Gary R. Wheeler4-Apr-03 14:18 
GeneralRe: Close External Programs Pin
DuFF4-Apr-03 15:22
DuFF4-Apr-03 15:22 
GeneralRe: Close External Programs Pin
Stephane Rodriguez.5-Apr-03 2:08
Stephane Rodriguez.5-Apr-03 2:08 
GeneralUsing SAFEARRAY Pin
Yank14-Apr-03 8:38
Yank14-Apr-03 8:38 
GeneralRe: Using SAFEARRAY Pin
J. Dunlap4-Apr-03 18:18
J. Dunlap4-Apr-03 18:18 
GeneralRe: Using SAFEARRAY Pin
J. Dunlap5-Apr-03 10:38
J. Dunlap5-Apr-03 10:38 
GeneralResizing CButton according to text. Pin
Maximilien4-Apr-03 7:55
Maximilien4-Apr-03 7:55 
QuestionHow to cancel ReadFile Pin
Anonymous4-Apr-03 7:29
Anonymous4-Apr-03 7:29 
AnswerRe: How to cancel ReadFile Pin
John M. Drescher4-Apr-03 8:10
John M. Drescher4-Apr-03 8:10 
GeneralRe: How to cancel ReadFile Pin
Heiko20034-Apr-03 8:46
sussHeiko20034-Apr-03 8:46 
GeneralRe: How to cancel ReadFile Pin
John M. Drescher4-Apr-03 8:51
John M. Drescher4-Apr-03 8:51 
GeneralRe: How to cancel ReadFile Pin
Heiko20035-Apr-03 10:15
sussHeiko20035-Apr-03 10:15 
AnswerRe: How to cancel ReadFile Pin
Dudi Avramov5-Apr-03 21:56
Dudi Avramov5-Apr-03 21:56 
GeneralProblem with flickering in WM_SIZE Pin
Optimus Chaos4-Apr-03 6:00
Optimus Chaos4-Apr-03 6:00 
GeneralRe: Problem with flickering in WM_SIZE Pin
Joan M4-Apr-03 6:41
professionalJoan M4-Apr-03 6:41 
GeneralRe: Problem with flickering in WM_SIZE Pin
Dudi Avramov5-Apr-03 21:59
Dudi Avramov5-Apr-03 21:59 
GeneralRe: Problem with flickering in WM_SIZE Pin
Optimus Chaos6-Apr-03 20:46
Optimus Chaos6-Apr-03 20:46 
QuestionHow do I pass a structure to a function?? Pin
IrishSonic4-Apr-03 6:00
IrishSonic4-Apr-03 6:00 
AnswerRe: How do I pass a structure to a function?? Pin
Jesse Evans4-Apr-03 6:24
Jesse Evans4-Apr-03 6:24 
GeneralRe: How do I pass a structure to a function?? Pin
John R. Shaw4-Apr-03 7:54
John R. Shaw4-Apr-03 7:54 
GeneralRe: How do I pass a structure to a function?? Pin
Jesse Evans4-Apr-03 8:15
Jesse Evans4-Apr-03 8:15 
GeneralRe: How do I pass a structure to a function?? Pin
Rob McBean4-Apr-03 10:31
Rob McBean4-Apr-03 10:31 
GeneralRe: How do I pass a structure to a function?? Pin
Jesse Evans4-Apr-03 10:55
Jesse Evans4-Apr-03 10:55 
GeneralRe: How do I pass a structure to a function?? Pin
Gary R. Wheeler4-Apr-03 14:24
Gary R. Wheeler4-Apr-03 14:24 
GeneralRe: How do I pass a structure to a function?? Pin
John R. Shaw4-Apr-03 15:36
John R. Shaw4-Apr-03 15:36 
I should have worded my replay earlier differently. I have not needed to read a book on C in years and I have know idea where my copy of "The C Programming Language" is. But here is the way I look at it (and yes I have been influenced by C++).

*pData is a dereferenced pointer (a dereference reference pointer to a memory address) and is therefore a reference to the data its self. In outher words pData could be considered an indirect reference to the data (although it looks like a direct reference to me).

Now then in C++ pData is a pointer to the data and *pData is a reference to the data. I beleive the first C++ compilers converted C++ code to C code and then use the already available C compiler (at least on UNIX).

Wether you agee with the above analiysis is only relevent to the acadimics of the subject though. Do mostly to my influence by C++, I perfer to differentiate between the two, since I do not wish to confuse outhers as to what I am actualy talking about.

Other than my comment, I did make a major mistake in the examples I gave the newbie. I forgot to give examples of how to call the function which sort of defeated the whole purpose.

foo(&myData); // C/C++ pass by address
// C++ pass by value or pass by reference depending
// on wether the function takes a value or refer a
// reference
for(myData);

Trust in the code Luke. Yea right!

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.