I am writing a code in which it would be good to skip some elements in line from file that I use as input.
For example:
Let us say I have this integers in line:
1 2 3 4 5 6 7 8 9 10 11 12
But I only need to use integers No. 2., 3., 6. and 11, so that input would be:
2 3 6 11
to their respective variables.
I know that I can input all of values and then just use the ones I need, but since I have 87 values inside the file and I only need 9 values, I would like not to even input these 78 unneeded values.
Is there a way to do this?
Note: All values are not of the same type.
Note: Wanted values will always be in the same spot.
Note: Total number of data in file(both wanted and unneeded) will always be the same.