how do i make a class stand in as one of its members?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
lumirion
Posts: 79
Joined: Tue Sep 13, 2011 7:35 am

how do i make a class stand in as one of its members?

Post by lumirion »

How can I make a class instance that redirects to one of its member values like int does? I want to be able to use a class instance m instead of m.myValue.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: how do i make a class stand in as one of its members?

Post by CuteAlien »

You have to overload the typecast operators of your class for what I think you want to do.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
lumirion
Posts: 79
Joined: Tue Sep 13, 2011 7:35 am

Re: how do i make a class stand in as one of its members?

Post by lumirion »

SWEET! Thank you this looks promising :)
Post Reply