I'm reading in user input for 2 coordinates it goes as follow:
Enter a coord: 10 5
I want to be able to read in the 10 as the row, and the 5 as the column.
Here's what I have.
char coord[5];
...
cout << "Enter a coord: ";
cin.getline(coord,sizeof(coord));
row = atoi(coord[0]);
So the code is giving me an error on atoi() and if a user enter a number like 10 char can't really read it from the indexes, how would you guys do this? Thanks.