converting a text to ascii then hexadecimal

hey,
can someone assist me in writing a code that can produce an ascii and hexadecimal from a text inputed. i know how to write a code that can change ascii and hexadecimal but i don know how to write one that has to use an ascii text file
Last edited on
are you asking how to read a file?

#include<fstream>
ifstream in(filename);

you can use in just like cin:

in >> variable;

etc.
...
in.close();
Topic archived. No new replies allowed.