-
August 8th, 2010, 11:42 AM
#1
size of structure
Can anyone tell why the size of this data structure is reported as 16 bytes when it should be 14 bytes ,
typedef struct _Fheader
{
unsigned short a; 2 byes
unsigned int imagesizeb; 4 bytes
unsigned short resc; 2 bytes
unsigned short resd; 4 bytes
unsigned int offset; 2 bytes all = 14 byes
} Fheader;
int _tmain(int argc, _TCHAR* argv[])
{
Fheader fheader;
cout << sizeof(Fheader) << endl ;
Sleep(5000);
return 0;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|