Advertisement
mario_mos

Mario_accesspp

Aug 30th, 2023
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #ifndef FILLE1_H
  2. #define FILLE1_H
  3. #include "mere.h"
  4.  
  5. class fille1 : public mere
  6. {
  7. public:
  8.     fille1();
  9.     int m_fi;
  10.     int display(int x);
  11. private :
  12.     int m_fiprivee;
  13.  
  14. };
  15.  
  16. #endif // FILLE1_H
  17.  
  18. #include "fille1.h"
  19. #include<iostream>
  20.  
  21. fille1::fille1()
  22. {
  23.     std::cout << "constructor fille1" << std::endl;
  24. }
  25.  
  26. int fille1::display(int x)
  27. {
  28.   std::cout<< x << "print du int membre" << std::endl;
  29. }
  30.  
  31. #include <iostream>
  32. #include <mere.h>
  33. #include <fille1.h>
  34. using namespace std;
  35.  
  36. int main()
  37. {
  38.     fille1 test_f1;
  39.     test_f1.m_fi = 5;
  40.     test_f1.m_fiprivee = 10;
  41.  
  42.  
  43.     return 0;
  44. }
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement