redefining methods in c++
No. You can override it, but if you use a different name, the inherited function will still exist.
Make it work.
Make it fast.
"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
Make it work.
Make it fast.
"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
quote:Original post by kindfluffysteve
does anybody know how, or if its possible to rename an inherreted function in c++?
It''s not directly possible, but you can possibly achieve the effect you want. What problem has led to you thinking you need to do such a thing?
just inherit protected or private instead of public
that will hide all of the public members of the base class, and then you can define your own interface to your derived class.
that will hide all of the public members of the base class, and then you can define your own interface to your derived class.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement