atol
De cppreference.com.
< cpp | string/byte
Syntaxe :
#include <cstdlib> long atol (const char *str);
La fonction atol() convertit str en un entier de type long, puis retourne cette valeur. atol() va lire depuis str jusqu'à la rencontre d'un caractère non-numérique.
Exemple d'utilisation :
x = atol( "1024.0001" );
Après l'exécution de cette portion de code, x vaut 1024.
Sujets connexes : atof, atoi, fr/c/io/sprintf, strtol