Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MERE_H
- #define MERE_H
- class mere
- {
- public:
- mere();
- virtual void print() = 0;
- };
- #endif // MERE_H
- #include "mere.h"
- #include <iostream>
- mere::mere()
- {
- }
- #ifndef FILLE_H
- #define FILLE_H
- #include "mere.h"
- class fille : public mere
- {
- public:
- fille();
- void print();
- };
- #endif // FILLE_H
- #include "fille.h"
- #include "mere.h"
- #include <iostream>
- fille::fille()
- {
- }
- #include <iostream>
- #include "mere.h"
- #include "fille.h"
- using namespace std;
- int main()
- {
- double i = 1.0;
- static_cast<float>(i);
- mere* ptr_m1 = new fille();
- fille* ptr_f1 = dynamic_cast<fille*>(ptr_m1);
- ptr_f1->print();
- const int u = 100;
- const int *pu = &u;
- int *k=const_cast<int*>(pu);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement