I'm terribly sorry for the long and probably unhelpful title, but I really can't think of a better way to put it.
I have a problem here, and I think I know how to do it, except for what I've put in bold:
Your program will prompt a user for a set of points [as in, on a Cartesean plane], first asking how many points will be in the set, then reading in the points. The program then offers the user the following menu until the user exits:
A) enter a new set of points [will restart from the begining]
B) move a particular point along the x axis, y axis, or x and y axis
C) mirror a particular point along the x axis, y axis, or x and y axis
D) output all of the points in their current state
That is, I know how to read in a set number of points and manipulate a single one, but I don't know how to do it with a user-specified (and thus unknown) number of points.
I don't know if this will be helpful or just extra information, but:
-all points will be integers
-I must use a class, Point
Once I know where to start with manipulating a specific point, I think the rest will be manageable.
first asking how many points will be in the set, then reading in the points.
1 2 3 4 5
cout << "How many points would you like to enter? ";
cin >> numPoints;
for (int i = 0; i < numPoints; i ++)
cin >> myArrayOfPoints[i].X >> myArrayOfPoints[i].Y;
move a particular point along the x axis, y axis, or x and y axis
1 2 3 4 5 6 7 8 9 10 11
cout >> "Please choose a point to move: "for (int i = 0; i < numPoints; i ++)
cout << i + 1 << ") " << myArrayOfPoints[i].X << " " << myArrayOfPoints[i].Y << "\n";
cin >> pointToMove;
cout << "Please enter the new X and Y coords: ";
cin >> toX >> toY;
myArrayOfPoints[i - 1].Move(toX, toY);
I'm sure you should be able to work out how to implement those pieces into your code.