typdef used by irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

typdef used by irrlicht

Post 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 ?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Post by Airslash »

*slaps self*
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Post 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*'
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Post by Airslash »

nvm solved it :)
Post Reply