fork(1) download
  1. class A {
  2. public:
  3. double p1, p2;
  4. virtual double fun(double, double) = 0;
  5. };
  6.  
  7. class B: public A {
  8. public:
  9. double fun(double, double) {};
  10. };
  11.  
  12. class C: public A {
  13. public:
  14. double fun(double, double) {};
  15. };
  16.  
  17. void proc(A** a) {
  18. }
  19.  
  20. int main() {
  21. B b;
  22. C c;
  23. A* a[2];
  24. a[0]=&b;
  25. a[1]=&c;
  26.  
  27. proc(a);
  28. }
  29.  
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty