Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class A{
  7. double b;
  8.  
  9. public:
  10. A(double arg) : b(arg){};
  11. virtual double virt_method(double a, double b)=0;
  12.  
  13.  
  14. };
  15.  
  16.  
  17. class B: public A{
  18. double virt_method(double a, double b){
  19. return (a+b);
  20. }
  21. B(double a):A(0){};
  22.  
  23.  
  24.  
  25.  
  26. };
  27.  
  28. int main()
  29. {
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement