#include <iostream> using namespace std; class Test { public: void fun() { cout<<"fun() in Test\n"; } }; int main() { new Test()->fun(); // your code goes here return 0; }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:12:12: error: expected ';' before '->' token
new Test()->fun();
^
Standard output is empty