0

so the user enters a string of coordinates like "(1,2) (3,4) (5,6) etc..." and I'm trying to use istringstream to pull out each number and put it into an integer value. This is what I've got so far:

```
string S1, temp;
int num1=0, tempX, tempY;
cin.ignore(15,'\n');
getline(cin,S1);
num1=S1.find("(");
S1.erase(S1.begin(),S1.begin()+num1+1);
cout << S1 << endl;
istringstream ss(S1);
ss >> tempX;
cout << tempX << endl;
num1=S1.find(",");
S1.erase(S1.begin(),S1.begin()+num1+1);
```

So far it only grabs the first number, and I'm at a loss of what to do next. Any suggestions?