I am a novice C++ programmer, and I'm having some trouble with this program. I want to input points, Cartesian plane style, but this code is acting like it doesn't see the cin
any time but the first. A
is a class that holds the points. When run, the program I am able to input one pair, but when it gets to the while loop, it says Enter pair (0,0 to finish) Enter pair (0,0 to finish)...
repeatedly.
do {
cout << "Enter pair (0,0 to finish) ";
cin >> x >> y;
A.add( x, y );
} while ( !(x==0 && y==0) );
Any ideas?