Advertisement
TwITe

Untitled

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