Initializing floating value of UNION in C
0
I have below union, typedef union { struct { float x; float y; float z; float Backup; } pt; float Max[4]; } Var3D; When I try to initialize above union like Var3D= { 0.0, 0.0, 0.0, 0.0 }; It shows build error like suggest braces around initialization of subobject [-Werror,-Wmissing-braces] Var3D= {0.0, 0.0, 0.0, 0.0}; How can I fix this?
c
share | improve this question
edited Nov 24 '18 at 7:24
Perry
asked Nov 24 '18 at 6:46