IO
#include <fstream>
#include <iomanip>
using namespace std;
int main()
{
int x,y; //multiple variables on the same line
ifstream inputFile("inputCoordinates.txt", ios::in);
ofstream myOutfile("output.txt",ios::app); //app
inputFile >> x >> y;
while (!inputFile.eof())
{
myOutfile << left;
myOutfile << setw(10) << x+1<< setw(10)<< y+1 << endl;
inputFile >> x >> y;
}
}
IO
#include <fstream>
#include <iomanip>
using namespace std;
int main()
{
int x,y; //multiple variables on the same line
ifstream inputFile("inputCoordinates.txt", ios::in);
ofstream myOutfile("output.txt",ios::app); //app
for (inputFile >> x >> y; !inputFile.eof(); inputFile >> x >> y)
{
myOutfile << left;
myOutfile << setw(10) << x+1<< setw(10)<< y+1 << endl;
}
}