class Sesion
{
private:
int wymiar = 2;
int **tablica = new int *[wymiar];
int licznik = 0;
void save(int x, int y)
{
for (int i = 0; i < wymiar; i++)
tablica[i] = new int[wymiar];
tablica[0][licznik] = x;
tablica[1][licznik] = y;
licznik++;
}
void open()
{
for (int i = 0; i < licznik; i++)
{
cout << tablica[0][i] << endl;
}
}
}
I dont know how to read value in open() because im getting weird numbers there.
In save() everything works perfect. Im must to save x and y in unlimited array and then read these values from it.
I know i can use Vector but i need to do it using Dynamic Array