/* more basics about pointers, including passing pointer type variables to functions */ #include double area(double*,double*); void main(){ int c=5, *b; b = &c; cout << b << " " << c << endl; c++; cout << *b << endl; (*b) ++; cout << c << endl; double *width_address, *length_address; // double* width_address, length_address would declare length_address to // be type double, not type double*. double width, length; cout << "Enter the width and length of the rectangle: "; cin >> width >> length; width_address = &width; length_address = &length; cout << "The area of the rectangle is " << area(width_address,length_address) << ".\n"; } double area (double * w_address, double * l_address){ return (* w_address) * (* l_address); }