Archived

This topic is now archived and is closed to further replies.

kindfluffysteve

redefining methods in c++

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites