Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. class c1 {};
  4. class c2 : public c1 {};
  5. class c3 : public c1 {};
  6. class c4 : public c2, public c3 {};
  7.  
  8. int main () {
  9. c4 *x1 = new c4;
  10. c3 *x2 = x1;
  11. delete x2; // segmentation fault
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement