Sunday, August 2, 2009

C: How to parse floats and chars from character array?

I have to take a string in the format "124124N63224E" or "7324S78781W" and put the two numbers into separate floats and the two characters into separate chars using the C programming language. The numbers can be of variable length. How can I do this?

C: How to parse floats and chars from character array?
Look at the sscanf() family of functions in the standard C library.
Reply:http://cppreference.com/stdio/sscanf.htm...


http://www.cplusplus.com/reference/clibr...





Google searching on "man sscanf" also works.


No comments:

Post a Comment