[Dev-C++] read line seperated with tab
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: sigit h. <rms...@ya...> - 2006-02-25 13:20:34
|
Halo Friends,
I need some help, some ideas from you........
I want to open a file, and read the lines. The file contents of 2 columns, the known parameter is at the first column and I want to get the parameter at the second column. But the case is that the first column´s parameters are strings with white-spaces (space), and there are tabs to the second column. If there is no white-spaces, I had done it succesfully, by doing:
while (! myfile.eof()){
myfile >> column1 >> column2 >> endl;
if (column1 == index1column1){
index1column2 = column2;
}
else if (column1 == index2column1){
index2column2 = column2;
}
}
so, how is it then if the case of string with whitespaces?
thank you very much for your help.
regards,
nima
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze. |