#include using namespace std; //define new type point struct point { double x, y; }; //don't forget the ; //void midpoint(double x1, double y1, double x2, double y2, double& , double&); point midpoint(point, point); point readpoint(istream&); void writepoint(ostream&, point); int main() { //read point data (x, y) from console point p1, p2; char junk; p1.x = 3; p1.y = 2; //access the "data members" of point cout << "enter coordinates (x,y)"; //cin >> junk >> p1.x >> junk >> p1.y >> junk; p1 = readpoint(cin); //assign p1 to p2 p2 = p1; //print point data //cout << p1.x << " " << p1.y <> junk >> p.x >> junk >> p.y >> junk; return p; } void writepoint(ostream& OUT, point p) { OUT << '(' << p.x << ',' << p.y << ')'; }