I have a two-dimensional array **parr it is filled with random numbers There is such a site

 int **ptr = 0; ptr = parr; cout << *ptr << ' '; ptr = ptr+1; cout << *ptr << ' '; cout << endl; 

In which I look at how the address changes, instead of moving by 4 bytes, my pointer moves by 16 bytes. I want to understand why this is happening and how to move the pointer to 4 bytes?

Screenshot from console

  • And why do you think that the pointer moves to 16 bytes? You do not display the value of the pointer. - VladD
  • In the screenshot, the last line is the output of that piece of code that I wrote above - Exsa_N
  • 2
    But in your code you do not display the value of the pointer that you increment. You increase ptr , and output *ptr . These are different things. - VladD
  • Isn't *ptr 'it will not be dereferencing the ptr to get a value from it? - Exsa_N
  • Everything, I sort of figured it out, thanks for the help - Exsa_N

0