Skip to main content
gamedev.net
🔒 Locked

UINT == unsigned long?

Started by andyb716 Nov 2, 2004 at 2:23 PM 1 replies 400+ views
Original Post
andyb716
andyb716
Hi, is UINT the same thing as unsigned long. I know its an unsigned int and it goes from 0 to 4 billion or whatever. And I know unsigned long does the same thing. I just dont want to type unsigned long everywhere in my code, id rather type UINT. I was just wondering is it the same thing.
moucard
moucard
You can search on your compiler's header files for the definition
The most probable case would be
#typedef unsigned int UINT
Namethatnobodyelsetook
Namethatnobodyelsetook
In Windows on Intel-32 chips, yes, they're the same thing... Windows typedefs UINT, it's not part of the standard types.

In Dos, or early Win16, a UINT would likely have been the same as a unsigned short, not an unsigned long.

If you want to know for sure what the type is, you'd better create your own set of type names... it's easy, and better than hoping UINT does what you want. "typedef unsigned long bob;" will create a type "bob" which is an unsigned long. Substitute bob for whatever name you'd like.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.