"Sameer" <en******@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
So how can I correct this? Is it only possible that the size of a class
is only multiple of size of int ?
What do you mean by correcting it? It is correct. What is it about the
size that you don't like?
It may be possible to compact the class/structure by a compiler specific
switch, but this can cause problems. There are some systems that an
unaligned value can cause the CPU to not read it correctly. It can also
slow down operation.
I would suggest you just leave it alone and don't worry about the 3 extra
bytes.
If you really must compact it for some reason, look at your compilers
switches and such. If you're using a microsoft compiler look at #pragma
pack