Hi all,
I have a value calculated from a member function of a class and assigned it to variable in my project say
unsigned short int var1=a.inf( ); since inf ( ) returns unsigned short int
Now I have to use this value var1 to calculate another variable var2 which should be uint64 as I have to pass this var2 to another function.
In order to make them compatible I can typecast var1,convert into uint64 and use it, but I lose the data.Could you please suggest me if there is any way to do this without typecasting and not losing any data.
Thanks.
I have a value calculated from a member function of a class and assigned it to variable in my project say
unsigned short int var1=a.inf( ); since inf ( ) returns unsigned short int
Now I have to use this value var1 to calculate another variable var2 which should be uint64 as I have to pass this var2 to another function.
In order to make them compatible I can typecast var1,convert into uint64 and use it, but I lose the data.Could you please suggest me if there is any way to do this without typecasting and not losing any data.
Thanks.
Comment