struct A { const int j; }; int main() { A a; //A * aa = new A(); return 0; }
Standard input is empty
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; ^
Standard output is empty