OT Ceckarsky kviz

Miroslav Šinko sinkomiro@gmail.com
Čtvrtek Březen 5 13:29:31 CET 2009


To je fakt, na to pozor... operator << implicitne pracuje s typmi int,
takze zalezi na reprezentacii int v kompilatore. Jano neuviedol
kompilator :-) V tom mojom priklade v MSVC to zahralo, lebo tento
kompilator ma int 32 bitove.

"Some operators (the unary operator ~, and the binary operators <<,
>>, &, ^, and |,
collectively described as bitwise operators) are required to have
operands that have
integer type. These operators yield values that depend on the internal
representations of
integers, and have implementation-defined and undefined aspects for
signed types."

miro

Dňa 5. marec 2009 13:18, Martin Persich <persich@transcon.cz> napísal/a:
> Myslim, ze ne. Chybi mi tam pretypovani na 16 bit operaci pred posuvem a
> prirazenim.
> Martin
>



Další informace o konferenci Hw-list