I have a list of numbers in a text file and I am trying to make a console application in C++ which converts those ASCII decimals into their symbol and then outputs them into a new file. For example, the ASCII decimal 88 into 'X'.
The text file looks as follows:
84
104
101
32
99
111
100
101
32
105
115
58
32
53
52
57
57
52
53
So far this is what I've got:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
    ifstream infile;
    infile.open("Output.txt");
    if (infile.fail()){
        cerr << "Error Opening File" << endl;
        //Terminate
    }
    int number;
    int count = 0;
    while(!infile.eof()){
        infile >> number;
        count++;
    }
    cout << count << " Number(s) Found!" << endl;
    cout << "\nConverting To Ascii!" << endl;
    //Convert To ASCII and Output to new file   
    return 0;
}
 
    