Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 2:13
mveCPallini12-Sep-11 2:13 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 2:33
Erudite_Eric12-Sep-11 2:33 
GeneralRe: Member function pionters in C++ Pin
MicroVirus12-Sep-11 3:08
MicroVirus12-Sep-11 3:08 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 3:09
Erudite_Eric12-Sep-11 3:09 
JokeRe: Member function pionters in C++ Pin
MicroVirus12-Sep-11 8:29
MicroVirus12-Sep-11 8:29 
GeneralRe: Member function pionters in C++ Pin
enhzflep12-Sep-11 18:27
enhzflep12-Sep-11 18:27 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 3:19
mveCPallini12-Sep-11 3:19 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 3:50
Erudite_Eric12-Sep-11 3:50 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 4:03
mveCPallini12-Sep-11 4:03 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 4:08
Erudite_Eric12-Sep-11 4:08 
QuestionRe: Member function pionters in C++ Pin
CPallini12-Sep-11 4:25
mveCPallini12-Sep-11 4:25 
AnswerRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 4:31
Erudite_Eric12-Sep-11 4:31 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 4:33
mveCPallini12-Sep-11 4:33 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 6:28
Erudite_Eric12-Sep-11 6:28 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 9:41
mveCPallini12-Sep-11 9:41 
GeneralRe: Member function pionters in C++ Pin
Chris Losinger12-Sep-11 6:04
professionalChris Losinger12-Sep-11 6:04 
Fat__Eric wrote:


You dont need to specify 'this->' when calling member funcs, you just call them by name. Thats the point I am making.


right. and the point i'm making is that the C++ designers made the 'this->' implicit when calling a member function directly from inside the class: the compiler simply assumes a call to non-static member fn CFoo::Whatever() from inside a class is the same as a call to this->Whatever() - they just let you omit the 'this->' for such a common case. but the C++ authors didn't provide for that little bit of syntactic shortcut when dealing with member fn ptrs. maybe there's a subtle technical reason they didn't give the same shortcut for member fn ptrs, but i haven't been able to find it. it seems obvious that if you can assume 'this' for a normal member fn call, you can assume this for a member fn ptr call.

Fat__Eric wrote:
Used a lot in C though. A heck of a lot. Surprises me they werent better catered for in C++.


but not so much in C++. i can count the number of times i've used them in C++ on one finger - and that was when doing a quick-n-dirty conversion of an old C program to C++.

GeneralRe: Member function pionters in C++ Pin
TheGreatAndPowerfulOz12-Sep-11 12:23
TheGreatAndPowerfulOz12-Sep-11 12:23 
GeneralRe: Member function pionters in C++ Pin
Chris Losinger12-Sep-11 15:20
professionalChris Losinger12-Sep-11 15:20 
GeneralRe: Member function pionters in C++ Pin
TheGreatAndPowerfulOz13-Sep-11 12:54
TheGreatAndPowerfulOz13-Sep-11 12:54 
GeneralRe: Member function pionters in C++ Pin
Chris Losinger13-Sep-11 15:51
professionalChris Losinger13-Sep-11 15:51 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric13-Sep-11 22:50
Erudite_Eric13-Sep-11 22:50 
AnswerRe: Member function pionters in C++ Pin
jschell12-Sep-11 8:30
jschell12-Sep-11 8:30 
GeneralRe: Member function pionters in C++ Pin
TheGreatAndPowerfulOz12-Sep-11 12:24
TheGreatAndPowerfulOz12-Sep-11 12:24 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 20:39
Erudite_Eric12-Sep-11 20:39 
GeneralRe: Member function pionters in C++ Pin
jschell13-Sep-11 11:38
jschell13-Sep-11 11:38 

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.