convertions....

convertions.... - Programmation

Marsh Posté le 24-02-2002 à 21:13:48    

salut !  
petit probleme en c
 
je dois récuperer un entier et le transformer en chaine de caractère.
chaine de caractere => entier : atoi()...ok
l'inverse j'ai pas trouvé...
quelqu'un peu m'aider ?

Reply

Marsh Posté le 24-02-2002 à 21:13:48   

Reply

Marsh Posté le 24-02-2002 à 21:14:44    

pis je m'excuse pour la giga erreur de fote d'orthographe dans le titre de mon  post

Reply

Marsh Posté le 24-02-2002 à 21:16:22    

facile : itoa();


---------------
Si tu regardes ce que le canard mange, tu ne mangeras pas de canard.
Reply

Marsh Posté le 24-02-2002 à 21:34:45    

merci !!! cé kool !!
A+

Reply

Marsh Posté le 24-02-2002 à 21:37:39    

ou printf


---------------
What butter and whiskey won't cure, there is no cure for.
Reply

Marsh Posté le 24-02-2002 à 23:47:26    

il est dans quel librairie ce truk ??

Reply

Marsh Posté le 25-02-2002 à 09:52:00    

deathsharp a écrit a écrit :

ou printf  




ouais, d'apres mes souvenir y a un sprintf() qui permet d'écrire dans un char* plutot que dans un fichier ...


---------------
ma vie, mon oeuvre - HomePlayer
Reply

Marsh Posté le 25-02-2002 à 11:03:38    

sprintf(ton_char*, "%i", ton_entier);


---------------
Chết rồi ! ✍ ⌥⌘ http://codeberg.org/gwh
Reply

Marsh Posté le 25-02-2002 à 18:08:56    

cycojesus a écrit a écrit :

sprintf(ton_char*, "%i", ton_entier);  




héhé, ca m'a marqué le C !! (souvenirs d'il y a 3 ans :))


---------------
ma vie, mon oeuvre - HomePlayer
Reply

Marsh Posté le 25-02-2002 à 18:13:11    

benou a écrit a écrit :

 
ouais, d'apres mes souvenir y a un sprintf() qui permet d'écrire dans un char* plutot que dans un fichier ...  




printf ecrit a l'ecran
quand je disais printf, je voulais parler bien de sprintf...
 
pour moi, les fonctions printf, sprintf, fprintf c pareil (en qq sort)


---------------
What butter and whiskey won't cure, there is no cure for.
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed