Whenever I see examples of unification, they are always different. For example, from MSDN:
// declaring_a_union.cpp union DATATYPE // Declare union type { char ch; int i; long l; float f; double d; } var1; // Optional declaration of union variable int main() { }
What happens if I have a union (in this case anonymous, but it does not matter):
union { float m_1stVar; float m_1stVarAlternateName; };
Whether it is good practice or not, will it cause any problems?
source share