|
-
November 1st, 2001, 02:17 PM
#1
How to determine the return value of sizeof(struct ...)
I have created a struct which is composed of a char and a short. But the return value of sizeof( this struct) is 4 while I expect it to be 3. If I add a short, the the return value is 6.
Is there a way to accurately predict the result of sizeof(struct or class)? Thanks!
signature
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
|