Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLinker problem Pin
ThatsAlok22-Dec-05 1:44
ThatsAlok22-Dec-05 1:44 
AnswerRe: Linker problem Pin
toxcct22-Dec-05 2:18
toxcct22-Dec-05 2:18 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 2:22
ThatsAlok22-Dec-05 2:22 
GeneralRe: Linker problem Pin
David Crow22-Dec-05 2:38
David Crow22-Dec-05 2:38 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 2:40
ThatsAlok22-Dec-05 2:40 
GeneralRe: Linker problem Pin
toxcct22-Dec-05 2:40
toxcct22-Dec-05 2:40 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 2:42
ThatsAlok22-Dec-05 2:42 
GeneralRe: Linker problem Pin
Cedric Moonen22-Dec-05 2:54
Cedric Moonen22-Dec-05 2:54 
toxcct wrote:
i don't know why it does happen


It is because the prototypes for a normal function (__cdecl) and a member function of a class (__thiscall) are different. For the class function, an extra parameter is passed implicitely which is the this parameter (in order for the function to be able to know which instance of the class called her).

Two solution: change the function to a global function (which is not really appropriate) or change it into a static function. A static function (member of a class) is shared among all instances of that class thus, it doesn't require the implicit this parameter but this also implies that you cannot use non-static members (functions or variables) of the class.
AnswerRe: Linker problem Pin
Cedric Moonen22-Dec-05 3:00
Cedric Moonen22-Dec-05 3:00 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 18:59
ThatsAlok22-Dec-05 18:59 
AnswerRe: Linker problem Pin
Eytukan22-Dec-05 3:19
Eytukan22-Dec-05 3:19 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 19:37
ThatsAlok22-Dec-05 19:37 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 21:39
ThatsAlok22-Dec-05 21:39 
AnswerRe: Linker problem Pin
S. Senthil Kumar22-Dec-05 3:48
S. Senthil Kumar22-Dec-05 3:48 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 18:49
ThatsAlok22-Dec-05 18:49 
GeneralRe: Linker problem Pin
S. Senthil Kumar22-Dec-05 19:12
S. Senthil Kumar22-Dec-05 19:12 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 19:43
ThatsAlok22-Dec-05 19:43 
GeneralRe: Linker problem Pin
ThatsAlok22-Dec-05 21:33
ThatsAlok22-Dec-05 21:33 
QuestionCOM in C language. Pin
pc_dev22-Dec-05 1:07
pc_dev22-Dec-05 1:07 
AnswerRe: COM in C language. Pin
Cedric Moonen22-Dec-05 1:53
Cedric Moonen22-Dec-05 1:53 
GeneralRe: COM in C language. Pin
pc_dev22-Dec-05 19:51
pc_dev22-Dec-05 19:51 
AnswerRe: COM in C language. Pin
Andy Moore22-Dec-05 6:44
Andy Moore22-Dec-05 6:44 
GeneralRe: COM in C language. Pin
pc_dev22-Dec-05 19:53
pc_dev22-Dec-05 19:53 
QuestionUsing a mask for drawing non rectangular bitmaps Pin
Ward22-Dec-05 0:36
Ward22-Dec-05 0:36 
AnswerRe: Using a mask for drawing non rectangular bitmaps Pin
PJ Arends22-Dec-05 8:43
professionalPJ Arends22-Dec-05 8:43 

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.