Assume that Point has already been defined as a structured type with two double fields, x and y. Write a function, getPoint that returns a Point value whose fields it has just read in from standard input. Assume the value of x precedes the value of y in the input.
.
.
Click on the title for the solution
.
.
.
Click on the title for the solution
.
.
This is the answer:
:
Point getPoint()
{Point p;
cin >> p.x >> p.y;
return p;
}
Comments
Post a Comment