#include <iostream.h>

class vehicle
{
public : vehicle()
{
}
int i;
float e;
};

main()
{
union a
{
char k;
int j;
vehicle obj;
};
cout<<sizeof(a)<<endl;
return 0;
}
this code gives compilation error as shown below error C2620: union 'a' : member 'obj' has user-defined constructor or non-trivial default constructor.

But without constructor same code prints 8 bytes...Need to know why defining constructor gives compilation problem ..pls clarify..