I have a string of a line I read from a file. String:("2021.2 12341.29 42.1"). I need to extract each of the three numbers into a double for each value which is shown by each space to insinuate a new number is there. The numbers will not always have the same spacing because I am doing this for multiple lines so I cant just go by the same exact point in the spacing. Here's what I have so far.
string vert; //I already got the read line so here for example I am subing in a value for vert.
vert = "2021.2 12341.29 42.1";
double num1, num2, num3;
for (int i = 0; i < vert.length(); i++){
...
}