Simple class declaration question
Hello,
I have seen a class declaration like this:
class ClassA NewClass public: ClassB
I can see that ClassB is the base class of NewClass, but I cannot understand why ClassA was put before NewClass... If that program didn't work, I would think it is a bug and simply type:
class NewClass public: ClassB
Thanks in advance.
Re: Simple class declaration question
That looks like a syntax error. I suggest that you post the smallest and simplest compilable program that demonstrates it.
Re: Simple class declaration question
Thank you for your reply. Actually this is part of a very large program. Instead, I am providing the comments of the coder right before this line:
// class NewClass inherits from ClassB,
// ClassA handles export/import of DLL
// Enables export and import of functions, data, and objects to and from a DLL.
// It's not necessary if you do not want to export this class for input in other DLLs:
I hope this helps.
Re: Simple class declaration question
This is a DLL export macro definition.
Search in your code for the definition of 'ClassA' - you will probably find an entry such as this one:
Code:
#define ClassA __declspec( dllexport )
See this for explanation on exporting functions / classes from a DLL.
Regards,
Zachm