filler in struct

Hi,
I m new to this forum and new to c++.I need to use filler in structure.I dont want to change the size of struct that i am receiving from server but i would like to pass extra information using the same struct to client side.Can you please guide me how i can do?. thanks
sag
If you don't want to change the size, you have to use shorter types for some of the other members if you can afford the range reduction.
Try looking at unions.
kooth can you please explain in little details?. thanks
A union is a variable that may hold (at different times) object of differnt types and sizes. The compiler keeps trak of the size and alignment requirements. The programmer has to know the current type of data stored in a union, so that adds complexity that you may not want.

But even by using a union, you will still have to sacrifice some of the data like Athar said.
Topic archived. No new replies allowed.