I need to copy numbers from one text file and input them in another but make them the next number for example 1->2 3->4 ... 9->0 I have gotten the copying part down but cant figure out how to make one number the next.
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main ()
{
     ifstream infile("input.txt");
     ofstream outfile("output.txt");
     string content = "";`
     int i;`
     for(i=0 ; infile.eof()!=true ; i++) // takes content 
         content += infile.get();
     i--;
     content.erase(content.end()-1);     // erase last character
     cout << i << " characters read...\n";
     infile.close();
     outfile << content;                 // output
     outfile.close();
     return 0;
}
I enter 1 2 3 4 5 and expect the output to be 2 3 4 5 6
 
     
     
     
    