|
From: Zodiaq <zo...@ac...> - 2002-12-28 22:57:18
|
Hello Magda and all Dev-C++ users, Saturday, December 28, 2002, 11:19:33 PM, Magda wrote as follows: MB> How to convert float to string LOL! first: for such questions you should use genereal discussion groups, this one is dedicated for DevC++... if you are form Poland (tak jak ja) then use this one: pl.comp.lang.c second: I use this simple method: char strInfo[ 100 ]; float fPi = 3.1415926; sprintf( strInfo, "%f", fPi ); remember to include <stdio.h> and if you really want to use string class then do this similar to this: strstream input; input << fPi; string strInfo( input.c_str( )); //or smth like this... MB> thanx -- regards, Zodiaq |