fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3. class Test
  4. {
  5. public:
  6. void fun()
  7. {
  8. cout<<"fun() in Test\n";
  9. }
  10. };
  11. int main() {
  12. new Test()->fun();
  13. // your code goes here
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:12:12: error: expected ';' before '->' token
  new Test()->fun();
            ^
stdout
Standard output is empty