Jump to content
  • Advertisement

Archived

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

kindfluffysteve

redefining methods in c++

This topic is 5724 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!