Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- // процесс создания и удаления двумерного динамического массива 5 * 5
- int** arr = new int* [5];
- for (int i = 0; i < 5; i++) {
- arr[i] = new int[5];
- }
- arr[3][3] = 100;
- cout << arr[3][3] << endl;
- for (int i = 0; i < 5; i++) {
- delete[] arr[i];
- }
- delete[] arr;
- }
Advertisement
Add Comment
Please, Sign In to add comment