I'm trying to read a file and convert them into ASCII value. This code can read and print all the symbol except the space. Guess when i read the file, it miss out the space already. Anybody know how to read the space in the file?
lots of helpCode:int main () { char ch; ifstream infile; infile.open("testing.txt"); while(infile >> ch) { int asciiValue = (int)ch; cout << asciiValue << " "; } infile.close( ); return 0; }
ken js



LinkBack URL
About LinkBacks


