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

C / C++ / MFC

 
QuestionBoost Test question urgent Pin
monsieur_jj1-Oct-07 22:25
monsieur_jj1-Oct-07 22:25 
QuestionWhat is theUse Of Abstract class Pin
tasumisra1-Oct-07 22:06
tasumisra1-Oct-07 22:06 
AnswerRe: What is theUse Of Abstract class Pin
Cedric Moonen1-Oct-07 22:38
Cedric Moonen1-Oct-07 22:38 
AnswerRe: What is theUse Of Abstract class Pin
Nemanja Trifunovic2-Oct-07 3:49
Nemanja Trifunovic2-Oct-07 3:49 
AnswerRe: What is theUse Of Abstract class Pin
Leslie Sanford2-Oct-07 6:35
Leslie Sanford2-Oct-07 6:35 
Questionthemes & controls Pin
mitok1-Oct-07 21:54
mitok1-Oct-07 21:54 
QuestionFunction Pointer error Pin
Mustafa Ismail Mustafa1-Oct-07 20:59
Mustafa Ismail Mustafa1-Oct-07 20:59 
AnswerRe: Function Pointer error Pin
Cedric Moonen1-Oct-07 21:09
Cedric Moonen1-Oct-07 21:09 
Member functions and globabl functions don't have the same prototype: for member function, an implicit parameter is passed in the argument list (the this pointer, identifying to which class instance the function belongs to). Thus, they are not compatible.

A way to solve the problem is to declare your member function as static, but then it won't belong to any instance (meaning that it won't be able to access non-static class members).

I think you can also declare in the function pointer that the function belongs to a certain class (but I'm not qbsolutely sure, you have to try it out):
typedef bool (WorkerClass::*pf)(std::string &, std::string &);


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: Function Pointer error Pin
Mustafa Ismail Mustafa1-Oct-07 21:20
Mustafa Ismail Mustafa1-Oct-07 21:20 
GeneralRe: Function Pointer error Pin
Cedric Moonen1-Oct-07 21:26
Cedric Moonen1-Oct-07 21:26 
GeneralRe: Function Pointer error Pin
Mustafa Ismail Mustafa1-Oct-07 21:21
Mustafa Ismail Mustafa1-Oct-07 21:21 
GeneralRe: Function Pointer error Pin
Cedric Moonen1-Oct-07 21:28
Cedric Moonen1-Oct-07 21:28 
GeneralRe: Function Pointer error Pin
Mustafa Ismail Mustafa1-Oct-07 21:38
Mustafa Ismail Mustafa1-Oct-07 21:38 
QuestionA Basic File Question. Pin
chandu0041-Oct-07 19:58
chandu0041-Oct-07 19:58 
AnswerRe: A Basic File Question. Pin
Nishad S1-Oct-07 20:43
Nishad S1-Oct-07 20:43 
GeneralRe: A Basic File Question. Pin
chandu0041-Oct-07 21:02
chandu0041-Oct-07 21:02 
AnswerRe: A Basic File Question. Pin
KarstenK1-Oct-07 21:17
mveKarstenK1-Oct-07 21:17 
AnswerRe: A Basic File Question. Pin
Nelek1-Oct-07 21:50
protectorNelek1-Oct-07 21:50 
QuestionError Message Pin
ashishbhatt1-Oct-07 17:50
ashishbhatt1-Oct-07 17:50 
AnswerRe: Error Message Pin
zakkas24831-Oct-07 18:06
zakkas24831-Oct-07 18:06 
GeneralRe: Error Message Pin
ashishbhatt1-Oct-07 18:17
ashishbhatt1-Oct-07 18:17 
AnswerRe: Error Message Pin
Ontanggabe Parulian1-Oct-07 18:40
Ontanggabe Parulian1-Oct-07 18:40 
GeneralRe: Error Message Pin
zakkas24831-Oct-07 18:41
zakkas24831-Oct-07 18:41 
GeneralRe: Error Message Pin
zakkas24831-Oct-07 18:48
zakkas24831-Oct-07 18:48 
AnswerRe: Error Message Pin
Stephen Hewitt1-Oct-07 19:08
Stephen Hewitt1-Oct-07 19:08 

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.