class base
{
public:
int fun(int)
{}
};
class base2
{
public:
int fun(float)
{
}
};
so here qustion is both function either function
overloading or over riding;
Answers were Sorted based on User's Feedback
Answer / utpal kashyap
Overloading...
Because Function overloading depends upon type of parameters/number of parameters (NOT type of function) passed in function, So this is the example of function overloading.
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / adarsh gumashta
Overloading would be possible if class 2 extended class1
but in the case its not there . so neither overloading nor overriding .
http://stackoverflow.com/a/14181786
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sandeep mannarakkal
Over loading and overriding , both are performing in the same scope, here both functions have different scope.
So it is NOT overloading ,
NOT over riding.
| Is This Answer Correct ? | 0 Yes | 0 No |
How many static variables are created if you put one static member into a template class definition?
What are friend functions?
Can we distribute function templates and class templates in object libraries?
What is c++ runtime?
What are function poinetrs? where are they used?
Why do we need runtime polymorphism in c++?
What are Binay tress and B trees? Diff between them?
What is stream and its types in c++?
What are the advantages of pointers?
Are there any special rules about inlining?
What is c++ hash?
Explain method of creating object in C++ ?