RE: [GD-General] meaning of sizeof(int) on all plateform
Brought to you by:
vexxed72
From: Jones, C. <CJ...@bl...> - 2003-06-26 22:20:26
|
This is all the standard has to say on the size of ints: "There are four signed integer types: "signed char", "short int", "int", and "long int." In this list, each type provides at least as much storage as those preceding it in the list. Plain ints have the natural size suggested by the architecture of the execution environment (1); the other signed integer types are provided to meet special needs." "(1) that is, large enough to contain any value in the range of INT_MIN and INT_MAX, as defined in the header <climits>." In other words, the result of sizeof(int) is never guaranteed to be of a certain size. Although I believe the ISO C99 standard added new header file, stdint.h, which declares some typedefs for specific sized integer types. If only more compilers would follow the standards... Chris -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of mitea Sent: Thursday, June 26, 2003 2:38 PM To: gam...@li... Subject: RE: [GD-General] meaning of sizeof(int) on all plateform sizeof(int)=sizeof(void*)=sizeof(pointer) sizeof(short)=sizeof(WORD)=2 sizeof(long)=sizeof(DWORD)=4 sizeof(__int64)=sizeof(LARGE_INTEGER)=8 sizeof(char)=sizeof(BYTE)=1 ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7 |