• Advertisement

Archived

This topic is now archived and is closed to further replies.

float -> char conversion

This topic is 6247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you convert from type float to type char (a string). Say for example, you want to put the result of a calculation in a message box. Thanx. |-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!

Share this post


Link to post
Share on other sites
Advertisement
    
float sum = 34.4 + 12.1;
char buff[32];


sprintf(buff, "%f", sum);



Edited by - SomeCodeGuy on January 15, 2001 5:19:37 PM

Share this post


Link to post
Share on other sites

  • Advertisement