
Daemonio
(usa Slackware)
Enviado em 02/05/2010 - 10:49h
Veja aqui:
http://support.microsoft.com/kb/67879/pt-br
%*[^%]
Scan the input string (without storing it in a variable) until the library encounters a percent sign (%) character. (The asterisk "*" instructs the compiler to scan the string without storing it in a variable.)
No seu caso, temos: %d%*[^\n]
Leia o número inicial do buffer de entrada e ignore o restante do buffer (supondo que o buffer termine com o \n -- que é o mais provável)
Exemplo:
int numero;
printf("Digite: ") ;
scanf("%d%*[^\n]",&numero) ;
printf ("-- %d\n",numero) ;
Executando:
Digite: 15huauhauha
-- 15
Digite: 8794hjadyudamnadsjha
-- 8794
Entendeu? xD
Bem, acho que é isso.
t+