On Jul 7, 12:18 am, Medvedev <3D.v.Wo...@gmail.comwrote:
On Jul 6, 2:12 pm, "Mike Wahler" <mkwah...@mkwahler.netwrote:
"Medvedev" <3D.v.Wo...@gmail.comwrote in message
news:7f**********************************@t54g2000 hsg.googlegroups.com....
What's that preprocessor do
#ifdef __cplusplus
extern "C" {
#endif
.
.
.
#ifdef __cplusplus
}
#endif
and how you say extern "C" , i mean how u extern constant!!
extern "C"
{
}
.. causes any functions inside the braces to have
"C linkage", so that they can be called from C
functions. There's nothing about 'constant' here.
sorry , but what differ C++ functions from C ones
Whatever the implementation wants. There's no fundamental
reason for two different languages to use the same calling
conventions. One typical difference might be that in C++, the
call stack is cleaned up in the called function (since it
involves calling destructors, etc.), where as in C, it is
cleaned up in the callee (since historically, C didn't have
prototypes, and allowed calling a function with extra arguments,
which were ignored). Also, C++ has overloading, which means
that some sort of information concerning the type and number of
arguments must be maintained in the object file. And because C
allowed extra arguments, a C compiler will not want to do this.
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34