Link to home
Start Free TrialLog in
Avatar of shayad
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.

Avatar of jhance
jhance

So what's the error?  I don't see any problem with what you've posted above.
ASKER CERTIFIED SOLUTION
Avatar of GlennDean
GlennDean

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just have a try about class XYZ:

Class XYZ{
....
virtual fnSomefunction( )=0;
}


good luck
:)
what is the answer???
who should get the points?