fork download
  1.  
  2. union preelement{
  3. int foo;
  4. double bar;
  5. };
  6.  
  7. struct element : preelement {
  8. char thing;
  9. };
  10.  
  11. int main() {
  12. element a;
  13. a.foo;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:29: error: base type 'preelement' fails to be a struct or class type
prog.cpp: In function 'int main()':
prog.cpp:12:12: error: aggregate 'element a' has incomplete type and cannot be defined
stdout
Standard output is empty