Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-19-2005, 06:36
Cobi Cobi is offline
Friend
 
Join Date: Sep 2004
Location: Germany
Posts: 55
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
Cobi Reputation: 0
sizeof() returns "wrong" Size of structure

Why is this structure 20 Bytes in size?
Code:
typedef	struct STGAHeader{

	BYTE	m_uIDSize;
	BYTE	m_uColorMapType;
	BYTE	m_uImageType;

	short	m_sColorMapStart;
	short	m_sColorMapLength;
	BYTE	m_uColorMapBits;

	short	m_sXStart;
	short	m_sYStart;
	short	m_sWidth;
	short	m_sHeight;
	BYTE	m_uBits;
	BYTE	m_uDescriptor;

} STGAHeader;
(BYTE = unsigned char = 1 byte, short = 2 bytes)
For me 1+1+1+2+2+1+2+2+2+2+1+1 is 18 and not 20 but the compiler thinks different
Its absolutely impossible that 6*integer1+6*integer2 is equal 20
(Intel 8.0 win)
thx, Cobi

Last edited by Cobi; 08-19-2005 at 06:39.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How come new registrants given "guest" rank and not even a "friend" rank? OldieHans General Discussion 4 09-25-2023 12:19
When use "vendor defined encryption routines", how to set daemon related part? bridgeic General Discussion 6 01-22-2015 11:35
Wlscgen: Are "Vendor Id" and "Developer Id" different ? Numega Softice General Discussion 6 02-12-2007 18:12


All times are GMT +8. The time now is 16:39.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )