Casten ist da dann aber trotzdem recht uncool, das runded ja immer nach unten ab (und kann auch mal ganz locker schiefgehen, wenn int standardmaessig unsigned ist).
boost::numeric_cast nehmen und gut ist.
Dieser Beitrag wurde von mmarx: 15 Feb 2008, 21:48 bearbeitet
--------------------
In my talons, I shape clay, crafting life forms as I please. Around me is a burgeoning empire of steel. From my throne room, lines of power careen into the skies of Earth. My whims will become lightning bolts that devastate the mounds of humanity. Out of the chaos, they will run and whimper, praying for me to end their tedious anarchy. I am drunk with this vision. God: the title suits me well.
|