gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > Casting

#8338 - Eats - Tue Jul 08, 2003 5:55 pm

I'm trying to cast a s16 to a s32, and no, this doesn't work:

s16 x = 5;
s32 y;

y = x;


This also doesn't work:

y = (s32)x;



So what does work?

#8349 - tepples - Tue Jul 08, 2003 10:32 pm

"Doesn't work" how? What is the exact text of the error message that GCC gives?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.