All Content
Blogs
Forums
News
Tutorials
Log In
Sign Up
Login
Username / Email
Password
Remember me
Forgot password?
Login
or
Don't have a GameDev.net account?
Sign up
Forgot your password?
Email Address
Reset Password
Please contact us if you have any trouble resetting your password.
Home
Blogs
Forums
News
Portfolios
Projects
Tutorials
24
users logged in
New?
Learn about game development
.
Before posting, review our
community guidelines
.
Support GameDev.net with a monthly
GDNet+ subscription
!
Follow Us
Chat in the
GameDev.net Discord!
Back to AngelCode
Advertisement
how to cast uint to int?
AngelCode
Affiliates
Started by
huangyous
June 08, 2009 10:07 PM
3
comments, last by
huangyous
15 years, 5 months ago
huangyous
Author
122
June 08, 2009 10:07 PM
i've tried int i=0; if(myarray.length()>(uint)i) but it prints:"Error :Expected'('"
Cancel
Save
DrBlort
146
June 08, 2009 10:50 PM
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!
Cancel
Save
Advertisement
huangyous
Author
122
June 09, 2009 01:07 AM
It's in AngelScript not c++
Cancel
Save
cvet
270
June 09, 2009 04:10 AM
if(myarray.length()>uint(i))
Cancel
Save
huangyous
Author
122
June 09, 2009 07:19 PM
thanks!It works
Cancel
Save
This topic is closed to new replies.
Advertisement
Popular Topics
poker game
For Beginners
Starting a new c++ thread
General and Gameplay Programming
Holding data
General and Gameplay Programming
Falloff
Math and Physics
Ideas for mechanics for battles.
Game Design and Theory
.Net
General and Gameplay Programming
Advertisement
Recommended Tutorials
Virtual Camera Position (VCP)
Graphics and GPU Programming
Intro to 3D Graphics Programming: Volume V
Graphics and GPU Programming
Algorithmic Forays Part 2
General and Gameplay Programming
Serious Sam shooter anniversary - finding bugs in the code of the Serious Engine v.1.10
General and Gameplay Programming
John Carmack .plan Archive - 2007
Interviews
Reticulating splines
About GameDev.net
Community Guidelines
Terms of Service
Privacy Policy
Contact Us
Copyright (c) 1999-2024 GameDev.net, LLC
Back to Top