Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class c1 {};
- class c2 : public c1 {};
- class c3 : public c1 {};
- class c4 : public c2, public c3 {};
- int main () {
- c4 *x1 = new c4;
- c3 *x2 = x1;
- delete x2; // segmentation fault
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement