Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all

i am trying to find the difference in size of struture availble at application level and when we debug and check its size in internal library.
can anyone suggest me a optimize and fast way to calculate the difference as these sturucture are very big.

:)
Posted

Huge structures?? It sounds like you have more of a design problem than doing simply math. Structures should never be so large as to be described as "huge". If you can describe them in terms of smallish number of bytes, great, but if you need something HUGE, classes are a better way to go.

Now, if you want the size of the structure, you'd need to know the starting address of the structure and address of the last member, as well as, the size of the last member.
 
Share this answer
 
Hi,

Im not getting you completely, but if u say u want the difference bw the structures go for the sizeof() function.

just keep in mind about the #pragma pack ,if u are using it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900