redefining methods in c++

Started by
2 comments, last by kindfluffysteve 21 years, 6 months ago
does anybody know how, or if its possible to rename an inherreted function in c++?
Advertisement
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
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
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.
daerid@gmail.com

This topic is closed to new replies.

Advertisement