"Alan" <be*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
a typo I made: the last sentance of the second to last paragraph should
say "It's really the only way to return multiple values from a
function."
I would tend to disagree.
struct ReturnStruct
{
bool Worked;
int Value;
}
ReturnStruct MyFunction( int SomeVal )
{
ReturnStruct ReturnThis;
if ( SomeVal > 10 )
ReturnThis.Worked = true;
else
ReturnThis.Worked = false;
ReturnThis.Value = SomeVal * 10;
return ReturnThis;
}
Although I will admit that is awfually horrible looking code. But it is in
fact another way.