Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInterdependent classes in C++ Pin
boffboy20-Jun-07 1:12
boffboy20-Jun-07 1:12 
AnswerRe: Interdependent classes in C++ Pin
Cedric Moonen20-Jun-07 1:21
Cedric Moonen20-Jun-07 1:21 
GeneralRe: Interdependent classes in C++ Pin
tom groezer20-Jun-07 1:53
tom groezer20-Jun-07 1:53 
GeneralRe: Interdependent classes in C++ Pin
toxcct20-Jun-07 1:56
toxcct20-Jun-07 1:56 
GeneralRe: Interdependent classes in C++ Pin
Cedric Moonen20-Jun-07 2:01
Cedric Moonen20-Jun-07 2:01 
AnswerRe: Interdependent classes in C++ Pin
toxcct20-Jun-07 1:29
toxcct20-Jun-07 1:29 
QuestionDirective Pin
tom groezer20-Jun-07 0:45
tom groezer20-Jun-07 0:45 
AnswerRe: Directive Pin
Cedric Moonen20-Jun-07 0:58
Cedric Moonen20-Jun-07 0:58 
It says that everything between the brackets ( '{' ) will have a C linkage type. The difference between a standard C++ linkage is that in C, you don't have function overloading. The linker generates name to identify the different functions and for C, this generated name is the same as the function name. In C++, it is different: as you can have function overloading, having only the name of the function to identify it is not sufficient. The compiler will add some information (it is called name mangling) depending of the arguments of the function.

When you specify this, you force the compiler to generate the functions names as a C compiler would do. That means also that you won't be able to overload a function.

It is used mainly for DLL's: when you want to be able to load a function using GetProcAddress, the name of the function you will need to pass to GetProcAddress is the 'mangled name'. Thus, it is very difficult to use. If you specify that the function has a C linkage, the name that you will pass to the GetProcAddress function will be the function name only, which makes it far easier to use.

Hope it was clear...


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: Directive Pin
toxcct20-Jun-07 1:32
toxcct20-Jun-07 1:32 
GeneralRe: Directive Pin
Cedric Moonen20-Jun-07 1:39
Cedric Moonen20-Jun-07 1:39 
GeneralRe: Directive Pin
tom groezer20-Jun-07 1:43
tom groezer20-Jun-07 1:43 
GeneralRe: Directive Pin
toxcct20-Jun-07 1:51
toxcct20-Jun-07 1:51 
QuestionRetriving Device information attached with system Pin
Karismatic20-Jun-07 0:38
Karismatic20-Jun-07 0:38 
QuestionRe: Retriving Device information attached with system Pin
David Crow20-Jun-07 2:35
David Crow20-Jun-07 2:35 
QuestionRe: Retriving Device information attached with system Pin
Hamid_RT20-Jun-07 9:13
Hamid_RT20-Jun-07 9:13 
QuestionProblem removing object from list Pin
Kevin Brydon20-Jun-07 0:28
Kevin Brydon20-Jun-07 0:28 
AnswerRe: Problem removing object from list Pin
Cedric Moonen20-Jun-07 0:49
Cedric Moonen20-Jun-07 0:49 
GeneralRe: Problem removing object from list Pin
Kevin Brydon20-Jun-07 1:20
Kevin Brydon20-Jun-07 1:20 
Questioncyclic reduction on c Pin
ovoundaga19-Jun-07 23:32
ovoundaga19-Jun-07 23:32 
Questioncyclic reduction on c Pin
ovoundaga19-Jun-07 23:28
ovoundaga19-Jun-07 23:28 
AnswerRe: cyclic reduction on c Pin
toxcct20-Jun-07 1:35
toxcct20-Jun-07 1:35 
QuestionHow to download the file using HTTP while the file is being uploaded using FTP? Pin
Jyo200719-Jun-07 21:28
Jyo200719-Jun-07 21:28 
AnswerRe: How to download the file using HTTP while the file is being uploaded using FTP? Pin
Iain Clarke, Warrior Programmer19-Jun-07 23:46
Iain Clarke, Warrior Programmer19-Jun-07 23:46 
GeneralRe: How to download the file using HTTP while the file is being uploaded using FTP? Pin
Jyo200720-Jun-07 0:53
Jyo200720-Jun-07 0:53 
QuestionRe: How to download the file using HTTP while the file is being uploaded using FTP? Pin
David Crow20-Jun-07 2:39
David Crow20-Jun-07 2:39 

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.