Convert float to string - Cypress.com Forums http://www.cypress.com/? Re: Convert float to string http://www.cypress.com/?rID=54116 Hi Liberty,

 

Thank you for sharing this on the forum !

 

]]>
Sat, 10 Sep 2011 05:50:36 -0600
Re: Convert float to string http://www.cypress.com/?rID=54109 I just discovered that the sprintf() function works perfectly for this conversion. The syntax is something like this:

float a = 4.8375;

char a_text[9];

sprintf(a_text,"%f",a);

a_text[4] = '\0';

 

this will return the string 4.84

]]>
Fri, 09 Sep 2011 19:49:07 -0600