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!!
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));
}
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.