struct Demo { void foo() { Demo d; this = &d; }};
Standard input is empty
prog.cpp: In member function ‘void Demo::foo()’: prog.cpp:4: error: lvalue required as left operand of assignment
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!