/* Example from p1_intro.mkv */ #include using namespace std; int main(){ int x = 17; // * means pointer_to_x is NOT an int, but a pointer to an int // &x means not the value of x (17) but the memory address where x is stored int *pointer_to_x = &x; cout << x << endl; cout << pointer_to_x << endl; *pointer_to_x = 900; cout << x << endl; cout << "Thing: " << *&*&*&*&*&*&*&*&x << endl; int y = 800; pointer_to_x++; cout << *pointer_to_x << endl; *(&x+1) = 123; cout << y << endl; return 0; }