#include <iostream> using namespace std; class What { private: int & ohNo; }; int main() { What what; return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:11:7: error: use of deleted function 'What::What()' What what; ^ prog.cpp:4:7: note: 'What::What()' is implicitly deleted because the default definition would be ill-formed: class What ^ prog.cpp:4:7: error: uninitialized reference member in 'class What' prog.cpp:7:9: note: 'int& What::ohNo' should be initialized int & ohNo; ^
Standard output is empty