// Pointers example (from class) // Michael Rothstein // 7/14/2014 #include using std::cin; using std::cout; using std::endl; int main(){ int *ip1, *ip2, one=1, two = 2; ip1=&one; ip2=ip1; *ip1 = *ip1 + 1; ip1=&two; *ip1 -= 1; cout << *ip2 << " " << *ip1 << endl; cout << one << " " << two << endl; cout << ip1 << " " << ip2 << endl; }