Hereditary class and function with same name

[SOLVED]
Hi everybody!
I have a question about the function with same name in two different classes.
I do an example for explain better my doubt:
I have a "class A" that have the function "void show(ostream& dest)"
I have a "class B:public A" that have the function "void show(ostream& dest)"
Can I call in the function show of class B the function show of class A?

1
2
3
4
5
  void show/*the function in class B*/(ostream& dest)
        {
            stampa(dest); /*I want that my program start there the function show of class A.*/
            dest<<"\nemail: "<<email;
        }


If I can do something as it, it's okay:
1
2
3
4
5

void show(ostream& dest):show(ostream& dest)
        {
            dest<<"\nemail: "<<email;
        }


I hope I explained myself, ask me more details if you need it! :<
Last edited on
Yes: A::show(dest);
Solved!
Thank you coder777! ^_^
Topic archived. No new replies allowed.