By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,188 Members | 1,003 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,188 IT Pros & Developers. It's quick & easy.

## _delete

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

<uu****@yahoo.com> schrieb im Newsbeitrag
news:11*********************@o13g2000cwo.googlegro ups.com...
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
Jul 23 '05 #2

P: n/a
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..?
Gernot Frisch wrote:
<uu****@yahoo.com> schrieb im Newsbeitrag
news:11*********************@o13g2000cwo.googlegro ups.com...
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


Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.