fork download
  1. class Foo {
  2. public:
  3. const int SomeFunction() { return iValue; }
  4. private:
  5. int iValue;
  6. };
  7.  
  8. int main() {
  9. Foo * foo = new Foo() ;
  10. foo->SomeFunction()->AnotherFunction();
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10: error: base operand of ‘->’ is not a pointer
stdout

Standard output is empty