| | |
int vscanf(constchar*format, va_list vlist ); | (1) | (desde C++11) |
| | |
int vfscanf( FILE *stream, constchar*format, va_list vlist ); | (2) | (desde C++11) |
| | |
int vsscanf(constchar*buffer, constchar*format, va_list vlist ); | (3) | (desde C++11) |
| | |
Lê os dados do uma variedade de fontes, interpreta-o de acordo com
format
e armazena os resultados em locais definidos pela
vlist
.
Original:
Reads data from the a variety of sources, interprets it according to format
and stores the results into locations defined by vlist
.
The text has been machine-translated via
Google Translate.
You can help to correct and verify the translation. Click
here for instructions.
1)Lê os dados a partir de
stdin.
Original:
Reads the data from stdin.
The text has been machine-translated via
Google Translate.
You can help to correct and verify the translation. Click
here for instructions.
2)Lê os dados do fluxo de arquivo
stream
.
Original:
Reads the data from file stream stream
.
The text has been machine-translated via
Google Translate.
You can help to correct and verify the translation. Click
here for instructions.
3)Lê os dados terminada em nulo
buffer
cadeia de caracteres.
Original:
Reads the data from null-terminated character string buffer
.
The text has been machine-translated via
Google Translate.
You can help to correct and verify the translation. Click
here for instructions.
stream | - | fluxo de arquivo de entrada para ler Original: input file stream to read from The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
buffer | - | ponteiro para uma cadeia de caracteres terminada em nulo para ler Original: pointer to a null-terminated character string to read from The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
format | - | ponteiro para uma cadeia de caracteres NULL-Terminated especificando como ler a entrada. A cadeia de formato consiste de caracteres em branco (qualquer caractere único espaço em branco na string de formato consome todos os disponíveis caracteres consecutivos de espaço em branco da entrada), não-branco personagens, exceto % (cada personagem como nas seqüências de formato consome exatamente um personagem idêntico a partir da entrada) e especificações de conversão. Cada especificação de conversão tem o seguinte formato: Original: The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. % caráter introdutório Original: introductory % character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional) atribuição de supressão * personagem. Se esta opção estiver presente, a função não atribuir o resultado da conversão de um argumento de recepção. Original: (opcional) assignment-suppressing character * . If this option is present, the function does not assign the result of the conversion to any receiving argument. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional) número inteiro (maior do que zero), que especifica' largura máxima de campo, isto é, o número máximo de caracteres que a função é permitido consumir ao fazer a conversão especificado pela especificação de conversão de corrente. Note-se que [% s% e pode levar a um estouro de buffer, se a largura não é fornecido.Original: (opcional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional)' modificador de comprimento que especifica o tamanho do argumento de recepção, isto é, o tipo de destino actual. Isso afeta a precisão de conversão e regras de estouro. O tipo de destino padrão é diferente para cada tipo de conversão (ver tabela abaixo).Original: (opcional)length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
formato de conversão especificador Original: conversion format specifier The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Os especificadores de formato disponíveis são: Original: The following format specifiers are available: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. Conversion specifier | Explanation | Argument type |
---|
length modifier | hh | h | (none) | l | ll | j | z | t | L |
---|
% | matches literal % | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
---|
c | matches a single character | N/A | N/A | | | N/A | N/A | N/A | N/A | N/A |
---|
s | matches a character string (a sequence of non-whitespace characters) |
---|
[ set] | corresponde a uma seqüência não-vazia de personagem de set de caracteres. Original: matches a non-empty sequence of character from set of characters. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Se o primeiro caractere do conjunto é ^ , então todos os personagens não no conjunto são correspondidos. Se o conjunto começa com ] ^] ou então o carácter ] também está incluído no conjunto de. Original: If the first character of the set is ^ , then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
d | combina inteiro decimal' a.Original: matches a decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 10 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 10 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | signedchar* or unsignedchar* | signedshort* or unsignedshort* | signedint* or unsignedint* | signedlong* or unsignedlong* | signedlonglong* or unsignedlonglong* | | | | N/A |
---|
i | combina inteiro decimal' a.Original: matches a decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 0 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 0 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
u | combina inteiro decimal sem sinal' a. Original: matches a unsigned decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtoul() com o 0 valor para o argumento base Original: The format of the number is the same as expected by strtoul() with the value 0 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
o | corresponde a uma 'inteiro octal'. Original: matches an octal integer. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 8 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 8 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
x | combina inteiro hexadecimal' um.Original: matches an hexadecimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 16 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 16 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
n | retorna 'número de caracteres lidos até agora' o. Original: returns the number of characters read so far. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Nenhuma entrada é consumida. Não incrementa a contagem de atribuição. Se o especificador tem a atribuição de supressão operador definido, o comportamento é indefinido Original: No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
a , A
e , E
f , F
g , G | combina 'número de ponto flutuante' um. Original: matches a floating-point number. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtof()Original: The format of the number is the same as expected by strtof()The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | N/A | N/A | | | N/A | N/A | N/A | N/A | |
---|
p | corresponde implementação seqüência de caracteres definidos definir um 'ponteiro'. Original: matches implementation defined character sequence defining a pointer. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
printf família de funções deve produzir a mesma seqüência usando %p especificador de formato Original: printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | N/A | N/A | | N/A | N/A | N/A | N/A | N/A | N/A |
---|
Original: pointer to a null-terminated character string specifying how to read the input. A cadeia de formato consiste de caracteres em branco (qualquer caractere único espaço em branco na string de formato consome todos os disponíveis caracteres consecutivos de espaço em branco da entrada), não-branco personagens, exceto % (cada personagem como nas seqüências de formato consome exatamente um personagem idêntico a partir da entrada) e especificações de conversão. Cada especificação de conversão tem o seguinte formato: Original: The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. % caráter introdutório Original: introductory % character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional) atribuição de supressão * personagem. Se esta opção estiver presente, a função não atribuir o resultado da conversão de um argumento de recepção. Original: (opcional) assignment-suppressing character * . If this option is present, the function does not assign the result of the conversion to any receiving argument. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional) número inteiro (maior do que zero), que especifica' largura máxima de campo, isto é, o número máximo de caracteres que a função é permitido consumir ao fazer a conversão especificado pela especificação de conversão de corrente. Note-se que [% s% e pode levar a um estouro de buffer, se a largura não é fornecido.Original: (opcional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
(opcional)' modificador de comprimento que especifica o tamanho do argumento de recepção, isto é, o tipo de destino actual. Isso afeta a precisão de conversão e regras de estouro. O tipo de destino padrão é diferente para cada tipo de conversão (ver tabela abaixo).Original: (opcional)length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
formato de conversão especificador Original: conversion format specifier The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Os especificadores de formato disponíveis são: Original: The following format specifiers are available: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. Conversion specifier | Explanation | Argument type |
---|
length modifier | hh | h | (none) | l | ll | j | z | t | L |
---|
% | matches literal % | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
---|
c | matches a single character | N/A | N/A | | | N/A | N/A | N/A | N/A | N/A |
---|
s | matches a character string (a sequence of non-whitespace characters) |
---|
[ set] | corresponde a uma seqüência não-vazia de personagem de set de caracteres. Original: matches a non-empty sequence of character from set of characters. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Se o primeiro caractere do conjunto é ^ , então todos os personagens não no conjunto são correspondidos. Se o conjunto começa com ] ^] ou então o carácter ] também está incluído no conjunto de. Original: If the first character of the set is ^ , then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
d | combina inteiro decimal' a.Original: matches a decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 10 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 10 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | signedchar* or unsignedchar* | signedshort* or unsignedshort* | signedint* or unsignedint* | signedlong* or unsignedlong* | signedlonglong* or unsignedlonglong* | | | | N/A |
---|
i | combina inteiro decimal' a.Original: matches a decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 0 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 0 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
u | combina inteiro decimal sem sinal' a. Original: matches a unsigned decimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtoul() com o 0 valor para o argumento base Original: The format of the number is the same as expected by strtoul() with the value 0 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
o | corresponde a uma 'inteiro octal'. Original: matches an octal integer. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 8 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 8 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
x | combina inteiro hexadecimal' um.Original: matches an hexadecimal integer'. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtol() com o 16 valor para o argumento base Original: The format of the number is the same as expected by strtol() with the value 16 for the base argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
n | retorna 'número de caracteres lidos até agora' o. Original: returns the number of characters read so far. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
Nenhuma entrada é consumida. Não incrementa a contagem de atribuição. Se o especificador tem a atribuição de supressão operador definido, o comportamento é indefinido Original: No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
---|
a , A
e , E
f , F
g , G | combina 'número de ponto flutuante' um. Original: matches a floating-point number. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
O formato do número é o mesmo que o esperado por strtof()Original: The format of the number is the same as expected by strtof()The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | N/A | N/A | | | N/A | N/A | N/A | N/A | |
---|
p | corresponde implementação seqüência de caracteres definidos definir um 'ponteiro'. Original: matches implementation defined character sequence defining a pointer. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
printf família de funções deve produzir a mesma seqüência usando %p especificador de formato Original: printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | N/A | N/A | | N/A | N/A | N/A | N/A | N/A | N/A |
---|
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
vlist | - | lista de argumentos variável que contém os argumentos que recebem Original: variable argument list containing the receiving arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar]Valor de retorno
Número de argumentos ler com êxito, ou se a falha ocorre
EOF.
Original:
Number of arguments successfully read, or EOF if failure occurs.
The text has been machine-translated via
Google Translate.
You can help to correct and verify the translation. Click
here for instructions.
[editar]Veja também
|
| lê entrada formatada de stdin, um fluxo de arquivo ou um tampão Original: reads formatted input from stdin, a file stream or a buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função)[edit] |
|
| impressões saída formatada para stdout, um fluxo de arquivo ou um buffer usando lista de argumentos variável Original: prints formatted output to stdout, a file stream or a buffer using variable argument list The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função)[edit] |
|
|