stod is used to "read" a double from a string. In this case the string orbits contains several doubles, so the first call to stod returns the first double, and then the location at where it stopped is stored in sz. After that stod is called again, but on the substring that starts at sz, in other words on the last double in the string. In other words, the first call to stod returns "365.24", the second call gets the substring that starts after sz, namely "29.53".