I/O question

Hello everyone, I'm a newbie C++ user and I'm in desperate need of help with an I/O Question.I've been asked to do the following:

Each of the integers of a give file corresponds to twice the ASCII value of a single character. Define and write the following function:

char translate (int i)

this function takes an integer i and returns the corresponding character.

Thank you for your help in advance
1
2
3
4
char translate(int i)
{
return i;
}

as the return type of function is char , it automatically converts integer value of i corresponding character by looking up in ASCII code table.
Topic archived. No new replies allowed.