hi i am converting C++ code in to C and trying to keep it close to c++ as much as
possible.
I have a class declaration in a.h as :
class B ;
class A
{
B xyz();
};
which is a case of forward referecing. i have conveerted A and B to structs. thats ok.
but how to handle this forward...
thanks Yogesh and Mani,
so what is deal here ...should i declare function pointers also within Struct as Mani said or I should just have data members in Struct declaration and code functions out side of struct and pass pointer to structs with in function arguments ??
thanks
hi,
I have class A which has virtual fn xyz() and class C, class B extend class A.
i am converting this C++ code into C code. how should I map the virtual function xyz() in to C bcoz in C we dont have virtual function ??
Should i copy this function xyz() into to the C programs corresponding...
hi,
I have existing C++ classes and I have to create corresponding "structs" in C for them.
how do we do that:
for e.g.
i have one class as
class Anand
{
private:
ClassA a;
public:
static const char * b;
Anand()
{
};
~Anand()
{
};
virtual int getxyz()
{
//return...
that's fine.
but i want the header to be visible from C compiler also.
for that i was thinking about something like
#if defined(C_PLUS_PLUS)
class xxx
{
public:
xxx* functionX();
};
#else...
thanks,
but i am talking for 100% pure C code where i cant use classes.
what about writng extern "C" functions ?? what is there limitations ??
hi,
i want to write C wrappers around exisitng C++ code. any suggestions
on how to do that. in what situations wrappers can be used and in what
situations we should avoid writing the wrappers ?
thnaks
hi,
i am new to this so pls pardon my mistakes, I have a client requirement which
says that they want to wrap their existing C++ apis within C programs and
users will access C++ functionality thru C, in essencce users are not
aware of any C++ presence. now my question is how do i call C++...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.