Connecting Tech Pros Worldwide Help | Site Map

## _delete

uuk007@yahoo.com
Guest
 
Posts: n/a
#1: Jul 23 '05
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

Gernot Frisch
Guest
 
Posts: n/a
#2: Jul 23 '05

re: ## _delete



<uuk007@yahoo.com> schrieb im Newsbeitrag
news:1107937543.658428.23040@o13g2000cwo.googlegro ups.com...[color=blue]
> 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 ##.[/color]

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


uuk007@yahoo.com
Guest
 
Posts: n/a
#3: Jul 23 '05

re: ## _delete


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:[color=blue]
> <uuk007@yahoo.com> schrieb im Newsbeitrag
> news:1107937543.658428.23040@o13g2000cwo.googlegro ups.com...[color=green]
> > 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 ##.[/color]
>
> ## means "concatenate", that is, glue together woithout whitepsace in[/color]
[color=blue]
> between.
> HTH,
> Gernot[/color]

Closed Thread