alors celle là, on la voit souvent ce serait pas mal de chercher sur ce site exemple : float et string
sinon, utilise la fonction _fcvt voici le copié/collé de l'example du msdn
/* FCVT.C: This program converts the constant * 3.1415926535 to a string and sets the pointer * *buffer to point to that string. */
#include <stdlib.h> #include <stdio.h>
void main( void ) { int decimal, sign; char *buffer; double source = 3.1415926535;
buffer = _fcvt( source, 7, &decimal, &sign ); printf( "source: %2.10f buffer: '%s' decimal: %d sign: %d\n", source, buffer, decimal, sign ); }
------------------------------- Réponse au message : -------------------------------
> Bonjour, > > Comment peut on convertire un float en string en c ???? > > Merci, > > Hobbes
|