B
bwalker
I have a question about type conversion. In the following code, what
would be the correct way to convert the variable idOut to an unsigned
short reference? I know that I'm going to loose precision but that is
okay.
typedef int Id;
bool function( Id& idOut, const std::string &name)
{
return obj->getXXX(name, (unsigned short&)idOut);
}
I should use reintrepret_cast<>, correct?
Thanks.
-brad w.
would be the correct way to convert the variable idOut to an unsigned
short reference? I know that I'm going to loose precision but that is
okay.
typedef int Id;
bool function( Id& idOut, const std::string &name)
{
return obj->getXXX(name, (unsigned short&)idOut);
}
I should use reintrepret_cast<>, correct?
Thanks.
-brad w.