Forse così l'esempio è più chiaro:
Guarda a cosa serve la strtoul: http://www.cplusplus.com/reference/c...tdlib/strtoul/codice:char buffer[256]; fgets(buffer,256,stdin); unsigned long myint; myint = strtoul(buffer, NULL, 0 ); printf("Il tuo intero: %d\n", myint);
Ciao![]()