KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm parsing GPS status entries in fixed NMEA sentences, where fraction part of geographical minutes comes always after period. However, on systems where locale defines comma as decimal separator, atof function ignores period and whole fraction part. What is the best method to deal with this issue? Long/latitude string in stored in character array, if it matters. Example Code: m_longitude = atof((char *)pField); Where pField[] = "01000.3897"; Cross-platform project, compiled for Windows XP and CE. Comment to solution: Accepted answer is more elegant, but this answer (and comment) is also worth knowing as a quick fix
Tags (comma-separated)
Save Edits
Cancel