fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. union test{
  5. static int a;
  6. int b;
  7. };
  8.  
  9. int main() {
  10. // your code goes here
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:13: error: ‘test::a’ may not be static because it is a member of a union
  static int a;
             ^
stdout
Standard output is empty