D
Daniel =?iso-8859-1?Q?Lidstr=F6m?=
Hi,
I'm currently using this method to extract doubles from a string:
System::String* sp = S" ";
System::String* tokens[] = s->Trim()->Split(sp->ToCharArray());
m_Northing = System:ouble:arse(tokens[0], nfi);
m_Easting = System:ouble:arse(tokens[1], nfi);
m_Elevation = System:ouble:arse(tokens[2], nfi);
However, only strings that contain one " " are correctly parsed. How can I
do this for strings that contain arbitrary number of " " between doubles?
I.e.:
"79812.862 15532.942 1565.570" is ok, while
"79812.862 15532.942 1565.570" is not ok.
With C++ I would just use a stringstream. Can I do this with MC++ too? I
have not yet figure out how.
Thanks!
I'm currently using this method to extract doubles from a string:
System::String* sp = S" ";
System::String* tokens[] = s->Trim()->Split(sp->ToCharArray());
m_Northing = System:ouble:arse(tokens[0], nfi);
m_Easting = System:ouble:arse(tokens[1], nfi);
m_Elevation = System:ouble:arse(tokens[2], nfi);
However, only strings that contain one " " are correctly parsed. How can I
do this for strings that contain arbitrary number of " " between doubles?
I.e.:
"79812.862 15532.942 1565.570" is ok, while
"79812.862 15532.942 1565.570" is not ok.
With C++ I would just use a stringstream. Can I do this with MC++ too? I
have not yet figure out how.
Thanks!