Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int **t = new int*[3];//inicjujemy tablice dynamiczną dwu wymiarową
- t[0]=new int[3];//pierwsza kolumna z 3 komórkami
- t[1]=new int[3];//druga z 3
- t[2]=new int[3];//3 z trzema...
- t[2][2]=1234;//do trzeciej kolumny i trzeciego wiersza wpisujemy wartość 1234
- cout<<t[2][2];
- delete []t[0];//po kolei zwalniamy miejsce z pamięci
- delete []t[1];
- delete []t[2];
- delete []t;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement