Page 1 of 1

typdef used by irrlicht

Posted: Wed Apr 16, 2008 1:14 pm
by Airslash
Hello,

I've taken a look at the source code and more specificly at the types beeing defined by irrlicht.

irr::u8 would be the same as unsigned char.

So I tried to make my custom classes return const unsigned char * pointers so that the value could be passed to irrlicht functions, since both should be equal by definition.

Yet when I try this, my compiler complains with :

invalid conversion from 'const unsigned char*' to 'const irr::c8*'.

What can't this be done ? they're the same type are they not ?

Posted: Wed Apr 16, 2008 1:31 pm
by JP
u8 is an unsigned char. c8 is not :P

c8 is a signed char, there's you problem, return a signed char instead of an unsigned one and it will work.

Posted: Wed Apr 16, 2008 1:33 pm
by Airslash
*slaps self*

Posted: Wed Apr 16, 2008 1:36 pm
by Airslash
ok i've updated all my unsigned char * types to signed char * types, but still its giving me the following error ::

Invalid Conversion from 'const signed char*' to 'const irr::c8*'

Posted: Wed Apr 16, 2008 1:44 pm
by Airslash
nvm solved it :)