Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. class One{
  7. public:
  8. One(){
  9. cout<<"One 111111";
  10. }
  11.  
  12. void myfunction(){
  13. cout<<"Hello from Class One myfunction....bla bla bla";
  14. }
  15.  
  16. };
  17. class Two {
  18. public:
  19. void TestingMethod(){
  20. cout<<"Testing 123 \n";
  21. }
  22. };
  23. class Three : public One, public Two {
  24. public:
  25. Three(){
  26. cout<<"Class Two Constructor running!";
  27. }
  28. void myfunction(){
  29. cout<<"Class 3....";
  30. }
  31. };
  32.  
  33.  
  34.  
  35. int main()
  36. {
  37. Three t;
  38. t.myfunction();
  39. t.TestingMethod();
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement