Advertisement

how to cast uint to int?

Started by June 08, 2009 10:07 PM
3 comments, last by huangyous 15 years, 5 months ago
i've tried int i=0; if(myarray.length()>(uint)i) but it prints:"Error :Expected'('"
Assuming that the language is C++, you can use:

(unsigned int)i

or

(UINT)i

The last one is actually a typedef.

I hope it's useful!
Advertisement
It's in AngelScript not c++
if(myarray.length()>uint(i))
thanks!It works

This topic is closed to new replies.

Advertisement