square fu {f} (/) some initialize * /} Foo () {/ * Do not do anything */ } }; Union Bar {Fu Fu; }; This code generates this error:
Error C2620: The member of the union 'bar' is 'bar :: FU' user defined constructor or non-trivial default constructor
I understand that if you have done something exactly what the constructor has done, then why can you throw that error, but the manufacturer does not take any parameters here and does nothing. Is there any way i can make this class stuff in the union? I have a way to do char foo [sizeof (foo)]
and want a cleaner solution.
Comments
Post a Comment