I am learning about pointers. when i practice assigning pointer * by pointer ** then p_to_p = ptr but *p_to_p != *ptr. Here is my practice code
#include <iostream>
using namespace std;
int main() {
int value = 100;
int *ptr = &value;
int **p_to_p = (int**)ptr;
cout << p_to_p << " " << ptr << endl;
cout << *p_to_p << " " << *ptr << endl;
return 0;
}
Please explain how it works when assigning pointers * to pointers **. Thank you very much!