Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n;
- std::cin>>n;
- char** p;
- p = new char[n];
- int second = 6;
- //memory allocation
- for(int i = 0; i < n; ++i)
- {
- p[i] = new char[second];
- ++second;
- }
- //freeing memory
- for(int i = 0; i < n; ++i;)
- {
- delete[] p[i];
- //p[i] = nullptr; C tva ne go podurja mai4e ;-;
- p[i] = NULL;
- }
- delete[] p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement