fork download
  1. class a
  2. {
  3.  
  4. };
  5.  
  6. class b :public a;
  7. class c :public a;
  8.  
  9. int main()
  10. {
  11. string st;
  12. a *temp;
  13. cin>>st;
  14.  
  15. if(st == "b")
  16. {
  17. a = new b()
  18. }
  19. else if(st == "c")
  20. {
  21. a = new c()
  22. }
  23.  
  24. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty