Sign in to follow this  
programmermattc

__int and the __ variable types

Recommended Posts

I've been searching around to find out what __int16 is as well as the types with that double underscore in front of it. Can anyone clear up what this does for variable types? For functions or classes?

Share this post


Link to post
Share on other sites
they are compiler specific extensions ... in this case __int16 is a signed 16 bit integer ... of course

the exist so that they can be used in situations which need more specific control over types and behaviors than available with the standard.

For instance, if you are writing a device driver that puts 16 bits into a certain spot, 8 bits somewhere else, multiplies two 64 bit numbers, etc ... these things are not general case computations where it is good enough to use the "int" "short" "unsigned long" etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this