shayad
asked on
Virtual functions
Hi,
Please consider a class
class XYZ{
...
virtual fnSomefunction(int);
}
class DER : public XYZ{
fnSomefunction(int);
fnSomefunction(int,int);
}
When I try to compile the above, I get an error related to the overloaded function. Cant I oveload a function which has been defined in he base class?
If so, then what is the reason?
Regards
Shayad.
Please consider a class
class XYZ{
...
virtual fnSomefunction(int);
}
class DER : public XYZ{
fnSomefunction(int);
fnSomefunction(int,int);
}
When I try to compile the above, I get an error related to the overloaded function. Cant I oveload a function which has been defined in he base class?
If so, then what is the reason?
Regards
Shayad.
So what's the error? I don't see any problem with what you've posted above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just have a try about class XYZ:
Class XYZ{
....
virtual fnSomefunction( )=0;
}
good luck
:)
Class XYZ{
....
virtual fnSomefunction( )=0;
}
good luck
:)
what is the answer???
who should get the points?
who should get the points?