Forse così l'esempio è più chiaro:

codice:
  
    char buffer[256];
    fgets(buffer,256,stdin);
    unsigned long myint;
    myint = strtoul(buffer, NULL, 0 );

    printf("Il tuo intero: %d\n", myint);
Guarda a cosa serve la strtoul: http://www.cplusplus.com/reference/c...tdlib/strtoul/


Ciao