P
puzzlecracker
is return type considered in the context of virtual functions?
ex.
class Base{
public:
virtual int foo(){}
};
class Derivedublic Base{
public:
virtual double foo();
};
On par, are access modifier considered, matter, how? in above context:
let's foo was declared public in Base and in protected in Derived...
and visa versa........
I am trying to compare the polymorphism resolution in C++ to Java,
where in latter there is concept of more/less specific, etc., I always
*assumed* that return value doesn' play any role whatsoever.
Please be as detailed as you have time and desire.
Thanks
ex.
class Base{
public:
virtual int foo(){}
};
class Derivedublic Base{
public:
virtual double foo();
};
On par, are access modifier considered, matter, how? in above context:
let's foo was declared public in Base and in protected in Derived...
and visa versa........
I am trying to compare the polymorphism resolution in C++ to Java,
where in latter there is concept of more/less specific, etc., I always
*assumed* that return value doesn' play any role whatsoever.
Please be as detailed as you have time and desire.
Thanks