#include <iostream>
int main()
{
int a = 5, b = 10;
int *ptr = &a;
int **ptrptr = &ptr;
std::cout << (*ptr) << "\n";
//
// dereference the pointer-to-pointer-to-int once to get
// the pointer-to-int it is pointing to and asign the address of
// b to that pointer.
*ptrptr = &b;
std::cout << (*ptr) << "\n";
}