## _delete

U

uuk007

Hi,

I am very new to C/C++ Programming...

Please let me explain what the following code will do.

#define Check(CN,VC) \

static void CN ## _save(WSDserialize*,void* ){} \

class CN ## _init \
{ \
public: \
CN ## _init() \
{ \
WSCbase::setCreateHandler(#CN, CN::createInstance); \
} \
~CN ## _init() \
{
WSCbase::setCreateHandler(#CN, NULL); \
} \
}; \



For this they are passing two class name as follow

Check(One,Two)

In my directory i have both One.cpp and Two.cpp

I am not aware of ##.

Regards

Udhaya
 
G

Gernot Frisch

Hi,

I am very new to C/C++ Programming...

Please let me explain what the following code will do.

#define Check(CN,VC) \

static void CN ## _save(WSDserialize*,void* ){} \

class CN ## _init \
{ \
public: \
CN ## _init() \
{ \
WSCbase::setCreateHandler(#CN, CN::createInstance); \
} \
~CN ## _init() \
{
WSCbase::setCreateHandler(#CN, NULL); \
} \
}; \



For this they are passing two class name as follow

Check(One,Two)

In my directory i have both One.cpp and Two.cpp

I am not aware of ##.

## means "concatenate", that is, glue together woithout whitepsace in
between.
HTH,
Gernot
 
U

uuk007

Thanks..One more doubt is

I understood that..

Some places they are using just #CN ...

I understand this is as Converting CN to some data type..

am i right..?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top