N
Newbee
Hello everyone.. this is my first post on this forum..
Well i was wondering if any of you could suggest a way for me to read
form an input file that has mixed ASCII integers and characters and
operators.. say a page full of random text contaning numbers,
alphabets and comas and other operators like ( * &^ % $ $ #@ .
I have to read each of the string form the file and then sort it.. now
the problem that i am facing is that when i use the standar
ifstream infile;
string getdata;
infile<<getdata;
then when i go to sort the alphabets its sorted properly, but when i
sor the numbers its all messed up as its sorting it based on the ASCII
value of its 1st character and not the entire number... so i tried
converting the string into integer but its not working..
If any of you have any ideas please let me know...
Thanks in advance
Well i was wondering if any of you could suggest a way for me to read
form an input file that has mixed ASCII integers and characters and
operators.. say a page full of random text contaning numbers,
alphabets and comas and other operators like ( * &^ % $ $ #@ .
I have to read each of the string form the file and then sort it.. now
the problem that i am facing is that when i use the standar
ifstream infile;
string getdata;
infile<<getdata;
then when i go to sort the alphabets its sorted properly, but when i
sor the numbers its all messed up as its sorting it based on the ASCII
value of its 1st character and not the entire number... so i tried
converting the string into integer but its not working..
If any of you have any ideas please let me know...
Thanks in advance