/* testpointer1.cpp CIS 150 David Klick 6/28/05 Simple pointer demonstration. */ #include using std::cout; int main(void) { int n; // create a pointer and make it point to n int *ptr = &n; n = 7; cout << n << '\n'; // equivalent to: n = n + 1 *ptr = *ptr + 1; cout << n << '\n'; return 0; }