![]() |
Word line classes
hi,
I want to know whether compiler implements bits padding in Classes as in structs?? eg: if my struct is struct info { char c; int i; }; Size of this structure would be 8 and not 5..(considering int is 4 bytes) On similar grounds if my class is class info { public: char c; int i; }; Size of this class would be 8 always? |
Re: Word line classes
the first one's size is 5 not 8 and the 2nd one's size is also 5 i think, 'couse public doesn't change anything.
|
Re: Word line classes
Hello Scripting,
Thanks for the reply.. However,the size of structure would be 8 as 3 bytes would be padded after "char c" member |
| All times are GMT +5.5. The time now is 20:17. |