Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MERE_H
- #define MERE_H
- class mere
- {
- public:
- mere();
- };
- #endif // MERE_H
- #include "mere.h"
- #include <iostream>
- mere::mere()
- {
- std::cout << "constructor mere" << std::endl;
- }
- #ifndef FILLE1_H
- #define FILLE1_H
- #include "mere.h"
- class fille1 : public mere
- {
- public:
- fille1();
- int m_fi;
- };
- #endif // FILLE1_H
- #include "fille1.h"
- #include<iostream>
- fille1::fille1()
- {
- std::cout << "constructor fille1" << std::endl;
- }
- #include <iostream>
- #include <mere.h>
- #include <fille1.h>
- using namespace std;
- int main()
- {
- fille1 tesf_f1;
- return 0;
- }
- /*RESULTAT*/
- 09:15:56: Starting /home/mariomoser/9_cpp/ex7_heritage/build-heritage1-Desktop-Debug/heritage1...
- constructor mere
- constructor fille1
- 09:15:56: /home/mariomoser/9_cpp/ex7_heritage/build-heritage1-Desktop-Debug/heritage1 exited with code 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement