Re: Display a 32bit value as a 4ch string?
- From: Gerry Hickman <gerry666uk2@xxxxxxxxxxxxxxxx>
- Date: Sun, 09 Nov 2008 16:19:02 +0000
Igor Tandetnik wrote:
wcout << (char)((dwFCC >> 24) & 0xFF) << (char)((dwFCC >> 16) & 0xFF)
<< (char)((dwFCC >> 8) & 0xFF) << (char)(dwFCC & 0xFF);
Thanks, this works.
I understand the bit shifting and char cast, but I don't understand the bitwise & with 0xFF. I'm guessing it's something to do with signed/unsigned?
--
Gerry Hickman (London UK)
.
- Follow-Ups:
- Re: Display a 32bit value as a 4ch string?
- From: Paavo Helde
- Re: Display a 32bit value as a 4ch string?
- From: David Wilkinson
- Re: Display a 32bit value as a 4ch string?
- References:
- Display a 32bit value as a 4ch string?
- From: Gerry Hickman
- Re: Display a 32bit value as a 4ch string?
- From: Igor Tandetnik
- Display a 32bit value as a 4ch string?
- Prev by Date: Re: manifest woes
- Next by Date: Re: Display a 32bit value as a 4ch string?
- Previous by thread: Re: Display a 32bit value as a 4ch string?
- Next by thread: Re: Display a 32bit value as a 4ch string?
- Index(es):
Relevant Pages
|
Loading