Gold mine of Visual C++ tricks!
Integers with fixed size.
![]()
While manipulating integer, in some cases we are worried about the size of int. Because, it depends the word length of processor. For instance while generating a binary message for your hardware etc.
Of course you have some macros such as BYTE etc which ensures the size in all processors word lengths, but will you get the real feel of a built-in integer?
![]()
Microsoft had provided __intn data types for integer values with different lengths. They are,
// Directly from MSDN. __int8 nSmall; // Declares 8-bit integer __int16 nMedium; // Declares 16-bit integer __int32 nLarge; // Declares 32-bit integer __int64 nHuge; // Declares 64-bit integer
You can use them without worrying about the length.

Targeted Audience – Beginners.
| Print article | This entry was posted by Jijo Raj on April 1, 2008 at 4:21 am, and is filed under Codeproject, Compiler Extension. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |









