Advertisement
TwITe

Untitled

Dec 27th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Base {
  5. private:
  6.     int *a;
  7.    // int b = 4;
  8. public:
  9.     Base() {
  10.         //try {
  11.             //a = new int[100]; // Выделение места в динамической памяти, память не высвобождается с помощью delete[]
  12.         //}
  13.         //catch
  14.         throw runtime_error("err");
  15.     }
  16.  
  17.     ~Base() {
  18.        // delete[] a;
  19.     }
  20. };
  21.  
  22. int main() {
  23.     Base base;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement