[Insight-users] What's # in "#thisClass"?

Yuanxin Zhu zhu4 at scripps.edu
Wed Jul 14 14:48:28 EDT 2004


Hi there,

I'm new to ITK and haven't touch C++ for quite a few years. While I read
itkMacro.h, I found the following statement for itkTypeMacro():

#define itkTypeMacro(thisClass,superclass) \
    virtual const char *GetNameOfClass() const \
        {return #thisClass;}

My question is what the "#" in front of "thisClass" stands for. My guess
is that it should be an operator to get the type of a class. But I can
NOT even spot it in "The C++ Programming Language (3rd Ed.)". Is the book
is too old to be a C++ reference?

Anyone has a clue?

Thank you in advance.

Yuanxin




More information about the Insight-users mailing list