fork download
  1. class Case{
  2. public:
  3. base* member;
  4. };
  5.  
  6. ...
  7.  
  8. base* aaa = new Test1();
  9. base* bbb = new Test2();
  10.  
  11. ...
  12.  
  13.  
  14. dynamec_cast<Test1*>(aaa)->Object.a = 1;
  15.  
  16. dynamec_cast<Test2*>(bbb)->Object.b = 2;
  17. dynamec_cast<Test2*>(bbb)->Object.c = 3;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3: error: ISO C++ forbids declaration of ‘base’ with no type
prog.cpp:3: error: expected ‘;’ before ‘*’ token
prog.cpp:6: error: expected unqualified-id before ‘...’ token
prog.cpp:9: error: expected constructor, destructor, or type conversion before ‘*’ token
prog.cpp:11: error: expected unqualified-id before ‘...’ token
prog.cpp:16: error: expected constructor, destructor, or type conversion before ‘<’ token
prog.cpp:17: error: expected constructor, destructor, or type conversion before ‘<’ token
stdout
Standard output is empty