Conversion chaine de caracteres en entier

Fermé
D LEHEMBRE - 14 févr. 2002 à 11:19
darkloran Messages postés 272 Date d'inscription vendredi 8 février 2002 Statut Membre Dernière intervention 30 avril 2003 - 14 févr. 2002 à 11:52
Je cherche en C++ à convertir une chaine de caractères (ex: "666") en entier (666).

Comment ça marche ?

Merci à l'avance
A voir également:

1 réponse

darkloran Messages postés 272 Date d'inscription vendredi 8 février 2002 Statut Membre Dernière intervention 30 avril 2003 56
14 févr. 2002 à 11:52
utilise les fonctions atoi ou atol selon que ton nombre est un entier (integer) ou un entier long (longint)

i = atol(input); (input la chaine, i le nombre résultant)

tchô
Loran;-D 
14