Hello. I have x40 text files with 3 strings. I have taken all of their 2nd strings with getline function and wrote them to a new text file. It looks like this:
4001 121125 5e+07 1.61401 0.00118607 1 9929166 6909475 1271116 1399686 151330 148624
4001 121125 5e+07 1.61325 5.4648e-05 1 19543361 13434019 2626510 3016553 198133 194521
4001 121125 5e+07 1.61407 0.000206556 1 8696655 5978504 1117929 1261023 145019 141940
4001 121125 5e+07 1.60799 0.000394664 1 380216 238085 33160 45680 30523 29885
...
My question is, i want to pass the first, second, third, fourth, fifth and sixth character(number) of the string, by the way the sixth character is always 1 and i want after that part. More, from starting after 1 of every string, all i got is 6 characters(numbers) in one string; i want to take the other number after it and the other number after it too, but also i want to sum the other two and last two and wrote all of these to a new file. But i tried many things nothing worked well. I faced with ridiculous arrays etc. Please help me. If you are confused, look after 1, i want to take first character after 1, the second and want to sum the other two and the last two in each string. I have x40 strings in one text file like this.