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
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.