Hi there,
Now I'm writing code mainly in C++. And some existing c code
will call some functions which are in a C++ class. I read the basic
techniques introduced from a SUN's web site.
Basically
1. we can add extern "C" keyword, or
2. use the object in C++ code as struct in C.
My question is: do we have to initialize the object in c? because
there is no constructor in c, will it call a default constructor in c++
when we declare
struct M;
in c, M is an object defined in C++?
Is there any detailed reference available on net?
TIA
Mike
Now I'm writing code mainly in C++. And some existing c code
will call some functions which are in a C++ class. I read the basic
techniques introduced from a SUN's web site.
Basically
1. we can add extern "C" keyword, or
2. use the object in C++ code as struct in C.
My question is: do we have to initialize the object in c? because
there is no constructor in c, will it call a default constructor in c++
when we declare
struct M;
in c, M is an object defined in C++?
Is there any detailed reference available on net?
TIA
Mike
Comment