I am trying to understand and use If I want to write No, if you write If you write the whole union, then surely you will write the full size of the union, which will be at least the size of your largest member. Do not do this. Which member of the union is current (i.e., the member who has given you a price recently), and just use that member Again, given the minimum information you provided, it is not clear that it is understandable to use an association. union in the Linux environment. Suppose I have the following union
union test {int one; Two long; } T1;
t1.one in a network file descriptor (socket FD), then the additional zero will be written in the FD as the Union chooses the most The big element, which is two; And it can be worse with the union of structures. Can anyone show me how to overcome it?
test.one in network FD, So you will write exactly the '
test.one is an
int item; The fact is that it is a member of a union, unless you completely use the union.
Comments
Post a Comment