fork(1) download
  1. #include <iostream>
  2. class A {
  3. };
  4. class B:public A
  5. {
  6. public:
  7. void foo() const { std::cout << "some is king of every fish"; }
  8. };
  9. int main() {
  10. A* pointer=new B;
  11. reinterpret_cast<B*>(pointer)->foo();
  12. return 0;
  13. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
some is king of every fish