Hi
I have a class defined like this
class CATDnbDocs {
public:
virtual void doload() = 0;
virtual void dodump() = 0;
...
};
I derive from this class and implement the above pure
virutal functions here:
class CATPartDocs : public CATDnbDocs {
public:
int doload();
int doload(CATDocument* doc);
...
};
I think what i am doing is just overriding the virtual function in the derived class. I am providing an implementation in the class's source file (CATPartDocs.cpp).
But when i try to compile this I am getting the following error.
D:\users\anand\projects\V5ServerWS\.\CATDocsApp\ProtectedInterfaces\CATPartDocs.h(28) : error C2555: 'CATPartDocs::doload' : overriding virtual function differs from 'CATDnbDocs::doload' only by return type or calling convention.
D:\users\anand\projects\V5ServerWS\.\CATDocsApp\ProtectedInterfaces\CATPartDocs.h(30) : error C2555: 'CATPartDocs::dodump' : overriding virtual function differs from 'CATDnbDocs::dodump' only by return type or calling convention.
I cant understand what mistake I am making in the definitions. Could anyone point out the error ?
I am using VC 6 c++ compiler on an NT4 workstation, to
give the specifics.
Thanks
Anand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mail me at abpillai@excite.com if you want additional help. I dont promise that I can solve your problem, but I will try my best.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have a class defined like this
class CATDnbDocs {
public:
virtual void doload() = 0;
virtual void dodump() = 0;
...
};
I derive from this class and implement the above pure
virutal functions here:
class CATPartDocs : public CATDnbDocs {
public:
int doload();
int doload(CATDocument* doc);
...
};
I think what i am doing is just overriding the virtual function in the derived class. I am providing an implementation in the class's source file (CATPartDocs.cpp).
But when i try to compile this I am getting the following error.
D:\users\anand\projects\V5ServerWS\.\CATDocsApp\ProtectedInterfaces\CATPartDocs.h(28) : error C2555: 'CATPartDocs::doload' : overriding virtual function differs from 'CATDnbDocs::doload' only by return type or calling convention.
D:\users\anand\projects\V5ServerWS\.\CATDocsApp\ProtectedInterfaces\CATPartDocs.h(30) : error C2555: 'CATPartDocs::dodump' : overriding virtual function differs from 'CATDnbDocs::dodump' only by return type or calling convention.
I cant understand what mistake I am making in the definitions. Could anyone point out the error ?
I am using VC 6 c++ compiler on an NT4 workstation, to
give the specifics.
Thanks
Anand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mail me at abpillai@excite.com if you want additional help. I dont promise that I can solve your problem, but I will try my best.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~