|
-
February 24th, 2004, 08:13 PM
#1
questions about virtual and non-virtual functions
It is okey to override a non-virtual function in a derived class. However, my question is that is there anything I should be aware of so that I won't do anything bad in that situation?
Another question is like this,
class base
{
public:
void f(int);
};
class derived : public base
{
public:
void f(float);
};
usually we will get a warning: Derived::f(float) hides Base::f(int). Why?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|