[gameprogrammer] Re: Cast by return type?
- From: "Husam Zakaria" <hzcppff@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sun, 30 Mar 2008 03:15:51 +0300
sure you can in C++, just like that:
struct MyStruct
{
char *s;
operator float* ( ) { return s;}
operator const float*( ) const { return s; }
};
so you can do something like this:
MyFunc(char * s)
{
}
MyStruct myStruct;
MyFunc(myStruct);
- References:
- [gameprogrammer] Cast by return type?
- From: Kevin Jenkins
Other related posts:
- » [gameprogrammer] Cast by return type?
- » [gameprogrammer] Re: Cast by return type?
- » [gameprogrammer] Re: Cast by return type?
- » [gameprogrammer] Re: Cast by return type?
- » [gameprogrammer] Re: Cast by return type?
- [gameprogrammer] Cast by return type?
- From: Kevin Jenkins