Read data from anarray and encode it? Code included!?

closed account (jE8qM4Gy)
I'm writing a program that encodes the data in a text file. The text file contains ascii values. I need to get these values and convert all to 5,6 digit even numbers.
Thank you in advance!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
void ReadArray( char inputfile[], char charString[])
{
// initialize variables

ifstream input;
char index;

// ouput inputfile
input.open(inputfile);

input >> index;
while( input.good() )
{
cout << DecodeChar(index) << " "; // here also another part of the problem
input >> index;
}

int DecodeChar(char c) // this is the function that has to convert ascii toi int
{

return (int(c - 32));

}
http://www.cplusplus.com/forum/general/85216/
http://www.cplusplus.com/forum/general/85245/

If you keep posting the same question without some kind of further explanation about what you're trying to accomplish (which is about as clear as mud,) you're going to keep getting the same lack of response.
Topic archived. No new replies allowed.