S S
12/10/2008 7:13:00 PM
On Dec 10, 11:30 pm, Vaclav Haisman <v.hais...@sh.cvut.cz> wrote:
> Explore_Imagination wrote, On 10.12.2008 17:16:> Hi All !!!
>
> > I am learning C++. Can any one guide me how we can efficiently convert
> > uint64 to unint32 ...
>
> > I am looking for an efficient way. E.g:
>
> > Let say I have a variable :
>
> > uint64 num = 6294967296;
> > Now I want to store value of "num" into two separate uint32
> > variables ???
>
> uint64 num = 6294967296;
> uint32 hi, lo;
> hi = num >> 32;
> lo = num & 0xFFFFFFFF;
>
>
>
> > Looking forward to hear from you guys.
>
> > /Hassan
>
> --
> VH
>
> signature.asc
> < 1KViewDownload
I thought the same but why not just,
lo = num
it will truncate itself the lower part?