Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl and WM_LBUTTONUP Pin
Taka Muraoka17-Dec-02 13:50
Taka Muraoka17-Dec-02 13:50 
GeneralRe: CListCtrl and WM_LBUTTONUP Pin
Chris Richardson17-Dec-02 14:48
Chris Richardson17-Dec-02 14:48 
GeneralRe: CListCtrl and WM_LBUTTONUP Pin
Taka Muraoka17-Dec-02 14:59
Taka Muraoka17-Dec-02 14:59 
GeneralStoopid funcptr question Pin
Klaus Probst17-Dec-02 11:28
Klaus Probst17-Dec-02 11:28 
GeneralRe: Stoopid funcptr question Pin
Taka Muraoka17-Dec-02 11:50
Taka Muraoka17-Dec-02 11:50 
GeneralRe: Stoopid funcptr question Pin
Michael Dunn17-Dec-02 16:01
sitebuilderMichael Dunn17-Dec-02 16:01 
GeneralRe: Stoopid funcptr question Pin
Klaus Probst17-Dec-02 18:08
Klaus Probst17-Dec-02 18:08 
GeneralRe: Stoopid funcptr question Pin
Taka Muraoka17-Dec-02 18:14
Taka Muraoka17-Dec-02 18:14 
IIRC, the reasoning goes something like this:

The name of a function is actually just a pointer to the first instruction of that function in memory somewhere. Kind of like when you declare an array of int's, the variable is actually a pointer to the first element.

So when you call a function foo(), you are just jumping to that particular place in memory. (*pFoo)() "dereferences" that "pointer" but since C++ doesn't really have a concept of a function object, it is taken to mean calling the function as well.

The "hack" in the language is really when you take the address of the function in the first place - we need the & operator to differentiate it from just a plain call to the function.



he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)

Awasu v0.4a[^]: A free RSS reader with support for Code Project.

GeneralMDI Question.... Pin
Ryan B.17-Dec-02 10:33
Ryan B.17-Dec-02 10:33 
GeneralRe: MDI Question.... Pin
Gary Kirkham17-Dec-02 11:04
Gary Kirkham17-Dec-02 11:04 
GeneralShellExecute Question. (urgent) Pin
RickGavin17-Dec-02 10:12
RickGavin17-Dec-02 10:12 
GeneralRe: ShellExecute Question. (urgent) Pin
Nish Nishant17-Dec-02 14:13
sitebuilderNish Nishant17-Dec-02 14:13 
GeneralRe: ShellExecute Question. (urgent) Pin
Michael Dunn17-Dec-02 16:04
sitebuilderMichael Dunn17-Dec-02 16:04 
GeneralRe: ShellExecute Question. (urgent) Pin
RickGavin17-Dec-02 18:24
RickGavin17-Dec-02 18:24 
GeneralDumb OnSaveDocument question.. Pin
RobJones17-Dec-02 9:30
RobJones17-Dec-02 9:30 
GeneralRe: Dumb OnSaveDocument question.. Pin
lucy17-Dec-02 9:44
lucy17-Dec-02 9:44 
GeneralRe: Dumb OnSaveDocument question.. Pin
RobJones17-Dec-02 9:46
RobJones17-Dec-02 9:46 
GeneralRe: Dumb OnSaveDocument question.. Pin
lucy17-Dec-02 9:53
lucy17-Dec-02 9:53 
GeneralRe: Dumb OnSaveDocument question.. Pin
RobJones17-Dec-02 10:03
RobJones17-Dec-02 10:03 
GeneralRe: Dumb OnSaveDocument question.. Pin
RobJones17-Dec-02 10:09
RobJones17-Dec-02 10:09 
Questionhow to derive a CArray method Pin
lucy17-Dec-02 8:26
lucy17-Dec-02 8:26 
AnswerRe: how to derive a CArray method Pin
Christian Graus17-Dec-02 8:39
protectorChristian Graus17-Dec-02 8:39 
GeneralRe: how to derive a CArray method Pin
lucy17-Dec-02 8:44
lucy17-Dec-02 8:44 
GeneralRe: how to derive a CArray method Pin
Christian Graus17-Dec-02 8:51
protectorChristian Graus17-Dec-02 8:51 
GeneralRe: how to derive a CArray method Pin
Tim Smith17-Dec-02 9:37
Tim Smith17-Dec-02 9:37 

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.