Do you read pairs of values and you don't know how many pairs the user would want to insert?
I would use two doubles and a container.
First initialize the two variables, then read the first pair using
After each pair reading, insert the values just read to a vector of double, or better yet a vector <pair<double> >;
If the pair type seems scary, you can replace it with a simple struct:
If you're not familiar with vectors, you should be!
double d1, d2;
while (...//until the user presses some key)
Here's a short tutorial: http://www.devx.com/DevX/LegacyLink/9396