#if 0 #include #include using namespace std; struct Point { double x,y; }; int main() { int *p; int x = 2; p = new int; //p[0] = 7; *p = 13; cout << " p is " << p << endl; cout << "p[0] is " << p[0] << endl; cout << "*p is " << *p << endl; p = &x; *p = 27; // change x!!! cout << " p is " << p << endl; cout << "*p is " << *p << endl; cout << " x is " << x << endl; cout << endl; Point *ptr; ptr = new Point; (*ptr).x = 33; ptr->y = 35; cout << "x value is " << (*ptr).x << endl; cout << "y value is " << (*ptr).y << endl; //delete p; return 0; } #endif