Advertisement
TwITe

Untitled

Dec 28th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A {
  5. public:
  6.     int* data;
  7.     A(int* d) : data(d) {
  8.         throw runtime_error("err");
  9.     }
  10. };
  11.  
  12. class B {
  13. public:
  14.     int* data2;
  15.     A* a;
  16.     B(A* aaa) : data2(new int[10]), a(aaa) {
  17.         delete[] data2;
  18.     }
  19. };
  20.  
  21. int main() {
  22.     A* c;
  23.     B base(c);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement