| isaacmaze (2) | |
|
For my program i need to read three different things per line, the format of the .txt file is: Fe B 2 O Xe 0 Al Ca 3 I need to read the three values from each line into three variables and then process those variables through some if statements. So for example, line 1 i need to read 'Fe' as the first string and then skip the whitespace and read 'B' as the next string then thirdly skip the next whitespace and read '2' as a type int. That's my only problem so if i can get a way to read the three values into different variables and ignore the whitespace then i know how to do the rest. Thanks to whoever helps me out. | |
|
|
|
| jlb (77) | |
|
It would help to know what language you are using C or C++. For C++ look up the iostream functions like cin. For C look at functions like scanf(). | |
|
|
|
| isaacmaze (2) | |
| using c++ sorry. | |
|
|
|
| Krofna (269) | |||
| |||
|
|
|||