Hello everybody, I'm desperate because I don't know anything about C++ and I must organize 340 files with experimental data from my thesis (I've tried to do this with MATLAB but demands a lot of time). Now I decided to use the C++. So,I must take a *.txt file open it and modify some rows as follow:
...
44,3256 0 0 108 23,568
44,3567 211 0 0 25,045
44,4620 0 104 0 25,786
44,8795 326 154 0 26,114
...
So I've 'm' rows (at least 22500 rows) by 5 columns and I must compare and save another file which
could not have values =<108 neither zero in the three central columns that are named as SR1 SR2 and SR3 respectively. After thie I'll use a dat file as input to solve an equation in Fortran. In the sample above the rows 1 and 3 must be deleted before sava the new file. I'm not sure if the file can be read as string or binary. So anu help Will be very appreciated. Thanks in advance.
Id use an ifstream to .open("myfile.txt")
build a stringstream around a getline on that stream,
use the getline with the comma delim to pull in each 'field'
for example if said data was in myFile.txt in same directory::