Click here to Skip to main content
12,624,429 members (38,786 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted

String to float conversion

, 3 May 2012 CPOL
Try int main() { char inputstr[] = "123.45"; float result= 0.0f; size_t len = sizeof(inputstr)-1; size_t dotpos = 0; for (size_t n = 0; n < len; n++) { if (inputstr[n] == '.') { dotpos = len - n - 1; } else { result =...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 3-May-12 3:47 Available CPallini
1 No 2-May-12 20:43 Available CPallini

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

CPallini
Software Developer (Senior) AEM S.p.A.
Italy Italy




Debugging? Klingons do not debug. Our software does not coddle the weak. Bugs are good for building character in the user.
-- The Klingon programmer


Beelzebub for his friends [^].




You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161128.1 | Last Updated 3 May 2012
Article Copyright 2012 by CPallini
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid