fork download
  1. struct A {
  2. const int j;
  3. };
  4.  
  5. int main() {
  6. A a;
  7. //A * aa = new A();
  8. return 0;
  9. }
Compilation error #stdin compilation error #stdout 0s 3468KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:4: error: uninitialized const member in ‘struct A’
  A a;
    ^
prog.cpp:2:12: note: ‘A::j’ should be initialized
  const int j;
            ^
prog.cpp:6:4: warning: unused variable ‘a’ [-Wunused-variable]
  A a;
    ^
stdout
Standard output is empty