Espaços nominais
Variantes
Acções

std::vprintf, std::vfprintf, std::vsprintf, std::vsnprintf

Da cppreference.com
< cpp‎ | io‎ | c

 
 
De entrada / saída da biblioteca
I / O manipuladores
C estilo de I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleta)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstrações
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cordas I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Matriz de I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleta)
(obsoleta)
(obsoleta)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Interface de categoria de erro
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
C estilo de I / O
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Arquivo de acesso
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Directa de entrada / saída
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não formatado entrada / saída
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formatado de entrada / saída
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)(C++11)(C++11)
vprintfvfprintfvsprintfvsnprintf
(C++11)
Arquivo de posicionamento
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
De tratamento de erros
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações em arquivos
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <cstdio>
int vprintf(constchar* format, va_list vlist );
(1)
int vfprintf( FILE *stream, constchar*format, va_list vlist );
(2)
int vsprintf(constchar*buffer, constchar*format, va_list vlist );
(3)
int vsnprintf(char*buffer, int buf_size, constchar*format, va_list vlist );
(4) (desde C++11)
Carrega os dados dos locais, definidos por vlist, converte-os em equivalentes de cadeia de caracteres e grava os resultados de uma variedade de pias.
Original:
Loads the data from the locations, defined by vlist, converts them to character string equivalents and writes the results to a variety of sinks.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Grava os resultados para stdout.
Original:
Writes the results to stdout.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Grava os resultados a um stream fluxo de arquivo.
Original:
Writes the results to a 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)
Grava os resultados para uma cadeia de caracteres buffer.
Original:
Writes the results to a 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.
4)
Grava os resultados a um buffer cadeia de caracteres. Na maioria dos personagens buf_size são escritos. A cadeia de caracteres resultante será encerrado com um caractere nulo, a menos que buf_size é zero.
Original:
Writes the results to a character string buffer. At most buf_size characters are written. The resulting character string will be terminated with a null character, unless buf_size is zero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar]Parâmetros

stream -
fluxo de arquivo de saída para gravar
Original:
output file stream to write to
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 para escrever
Original:
pointer to a character string to write to
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
buf_size -
número máximo de caracteres para escrever
Original:
maximum number of characters to write
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 a forma de interpretar os dados.
A cadeia de formato consiste de espaços em branco, não-branco personagens (exceto %) e especificações de conversão. Cada especificação de conversão tem o seguinte formato:
Original:
The format string consists of whitespace characters, non-whitespace characters (except %) 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) um ou mais sinalizadores que modificam o comportamento da conversão:
    Original:
    (opcional) one or more flags that modify the behavior of the conversion:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -: o resultado da conversão é justificado à esquerda dentro do campo (por padrão é justificada à direita)
    Original:
    -: the result of the conversion is left-justified within the field (by default it is right-justified)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • +: o sinal de conversões assinado é sempre prefixado no resultado da conversão (por padrão, o resultado é precedido por menos só quando é negativo)
    Original:
    +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' Espaço: se o resultado de uma conversão assinada não começa com um carácter de sinal, ou estiver vazio, o espaço é anexado ao resultado. É ignorado se + bandeira está presente.
    Original:
    space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • #:' forma alternativa da conversão é executada. Consulte a tabela abaixo para efeitos exatos.
    Original:
    # : alternative form of the conversion is performed. See the table below for exact effects.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 0: para conversões de números inteiros e de ponto flutuante, zeros à esquerda são usados ​​para preencher o campo em vez de espaço personagens. Para os números de ponto flutuante é ignorada se a precisão é explicitamente especificado. Para outras conversões usando esses resultados bandeira em um comportamento indefinido. É ignorado se - bandeira está presente.
    Original:
    0 : for integer and floating point number conversions, leading zeros are used to pad the field instead of space characters. For floating point numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional) valor inteiro ou * que especifica a largura de campo mínima. O resultado é preenchido com espaço personagens (por padrão), se necessário, à esquerda quando justificada à direita, ou à direita, se justificado à esquerda. No caso quando * é usado, a largura é especificada por um argumento suplementar de int tipo. Se o valor do argumento é negativo, o resultado com a largura do campo - sinalizador especificado e positivo.
    Original:
    (opcional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int. If the value of the argument is negative, it results with the - flag specified and positive field width.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional). seguido de um número inteiro ou * que especifica' precisão da conversão. No caso quando * é usado, o' precisão é especificada por um argumento suplementar de int tipo. Se o valor deste argumento é negativo, ele será ignorado. Consulte a tabela abaixo para efeitos exatos de precisão'.
    Original:
    (opcional). followed by integer number or * that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int. If the value of this argument is negative, it is ignored. See the table below for exact effects of precision.
    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
    Original:
    (opcional)length modifier that specifies the size of the argument
    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 hhh (none) llljztL
% writes literal %. The full conversion specification must be %%. N/AN/AN/AN/AN/AN/AN/AN/AN/A
c writes a single characterN/AN/Acharwchar_tN/AN/AN/AN/AN/A
s writes a character stringN/AN/Achar*wchar_t*N/AN/AN/AN/AN/A
d
i
converte 'decimal inteiro' um assinado no estilo [-] dddd.
Original:
converts a signed decimal integer in the style [-]dddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signedchar
signedshort
signedint
signedlong
signedlonglong
intmax_t
size_t
ptrdiff_t
N/A
o
converte um assinado 'inteiro octal' no estilo [-] oooo.
Original:
converts a signed octal integer in the style [-]oooo.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na execução alternativa' precisão é aumentada, se necessário, para escrever um zero inicial.
Original:
In the alternative implementation precision is increased if necessary, to write one leading zero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Nesse caso, se tanto o valor convertido ea precisão são 0, 0 único é escrito.
Original:
In that case if both the converted value and the precision are 0, single 0 is written.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A
x
X
converte 'inteiro hexadecimal' um assinado no estilo [-] hhhh.
Original:
converts a signed hexadecimal integer in the style [-]hhhh.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para as cartas de conversão xabcdef são used.
Original:
For the x conversion letters abcdef are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para as cartas de conversão XABCDEF são used.
Original:
For the X conversion letters ABCDEF are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa'0x ou 0X é prefixado para os resultados se o valor convertido é diferente de zero.
Original:
In the alternative implementation0x or 0X is prefixed to results if the converted value is nonzero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A
u
converte 'inteiro decimal sem sinal' um no estilo dddd.
Original:
converts an unsigned decimal integer in the style dddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precision' especifica o número mínimo de dígitos que aparecem.
Original:
Precision specifies the minimum number of digits to appear.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 1.
Original:
The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unsignedchar
unsignedshort
unsignedint
unsignedlong
unsignedlonglong
uintmax_t
N/A
f
F
converte 'número de ponto flutuante à notação decimal no estilo [-] ddd.ddd.
Original:
converts floating-point number' to the decimal notation in the style [-]ddd.ddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 6.
Original:
The default precision is 6.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/A
double
double
N/AN/AN/AN/A
longdouble
e
E
converte número de ponto flutuante à notação decimal expoente.
Original:
converts floating-point number to the decimal exponent notation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão e [-] d.ddd'e ± dd é used.
Original:
For the e conversion style [-]d.ddde±dd is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão E [-] d.ddd'E ± dd é used.
Original:
For the E conversion style [-]d.dddE±dd is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O expoente contém pelo menos dois dígitos, mais dígitos são utilizadas, se necessário.
Original:
The exponent contains at least two digits, more digits are used only if necessary.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o valor for 0, o expoente é também 0.
Original:
If the value is 0, the exponent is also 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 6.
Original:
The default precision is 6.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
a
A
converte número de ponto flutuante à notação hexadecimal expoente.
Original:
converts floating-point number to the hexadecimal exponent notation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão a [-]'0x h.hhh'p ± d é used.
Original:
For the a conversion style [-]0xh.hhhp±d is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão A [-]'0X h.hhh'P ± d é used.
Original:
For the A conversion style [-]0Xh.hhhP±d is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O primeiro dígito hexadecimal é 0 se o argumento não é um valor de ponto flutuante normalizada.
Original:
The first hexadecimal digit is 0 if the argument is not a normalized floating point value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o valor for 0, o expoente é também 0.
Original:
If the value is 0, the exponent is also 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é suficiente para a representação exata do valor.
Original:
The default precision is sufficient for exact representation of the value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
g
G
converte 'número de ponto flutuante à notação decimal ou expoente decimal, dependendo do valor e da precisão'.
Original:
converts floating-point number to decimal or decimal exponent notation depending on the value and the precision.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para a conversão de conversão com estilo ge estilo ou f será performed.
Original:
For the g conversion style conversion with style e or f will be performed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para a conversão de conversão com estilo GE estilo ou F será performed.
Original:
For the G conversion style conversion with style E or F will be performed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Deixe P precisão iguais se 6, diferente de zero se a precisão não é especificado, ou 1 se a precisão é 0. Depois, se uma conversão com E estilo teria um expoente de X:
Original:
Let P equal the precision if nonzero, 6 if the precision is not specified, or 1 if the precision is 0. Then, if a conversion with style E would have an exponent of X:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • se P> X ≥ -4, a conversão é com estilo f ou F precisão e P - 1 - X.
    Original:
    if P > X ≥ −4, the conversion is with style f or F and precision P − 1 − X.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • caso contrário, a conversão é com estilo e ou E precisão e P - 1.
    Original:
    otherwise, the conversion is with style e or E and precision P − 1.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
A menos que' representação alternativa é solicitado os zeros à direita são removidos, também o caractere de ponto decimal é removido se nenhuma parte fracionária é deixado.
Original:
Unless alternative representation is requested the trailing zeros are removed, also the decimal point character is removed if no fractional part is left.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
n
retorna 'número de caracteres escritos' o até agora por esta chamada para a função.
Original:
returns the number of characters written so far by this call to the function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O resultado é' escrito para o valor apontado pelo argumento.
Original:
The result is written to the value pointed to by the argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A especificação completa deve ser %n.
Original:
The complete specification must be %n.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/Aint*N/AN/AN/AN/AN/AN/A
p writes an implementation defined character sequence defining a pointer. N/AN/Avoid*N/AN/AN/AN/AN/AN/A
'' Notas:
Original:
Notes:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
As funções de conversão de ponto flutuante converter infinito para inf ou infinity. Qual é usado é defined.
implementação
Original:
The floating point conversion functions convert infinity to inf or infinity. Which one is used is implementation defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não-um número é convertido para nan ou nan(char_sequence). Qual é usado é defined.
implementação
Original:
Not-a-number is converted to nan or nan(char_sequence). Which one is used is implementation defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
As conversões F, E, G, A saída INF, INFINITY, NAN vez.
Original:
The conversions F, E, G, A output INF, INFINITY, NAN instead.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
pointer to a null-terminated character string specifying how to interpret the data.
A cadeia de formato consiste de espaços em branco, não-branco personagens (exceto %) e especificações de conversão. Cada especificação de conversão tem o seguinte formato:
Original:
The format string consists of whitespace characters, non-whitespace characters (except %) 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) um ou mais sinalizadores que modificam o comportamento da conversão:
    Original:
    (opcional) one or more flags that modify the behavior of the conversion:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -: o resultado da conversão é justificado à esquerda dentro do campo (por padrão é justificada à direita)
    Original:
    -: the result of the conversion is left-justified within the field (by default it is right-justified)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • +: o sinal de conversões assinado é sempre prefixado no resultado da conversão (por padrão, o resultado é precedido por menos só quando é negativo)
    Original:
    +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' Espaço: se o resultado de uma conversão assinada não começa com um carácter de sinal, ou estiver vazio, o espaço é anexado ao resultado. É ignorado se + bandeira está presente.
    Original:
    space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • #:' forma alternativa da conversão é executada. Consulte a tabela abaixo para efeitos exatos.
    Original:
    # : alternative form of the conversion is performed. See the table below for exact effects.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 0: para conversões de números inteiros e de ponto flutuante, zeros à esquerda são usados ​​para preencher o campo em vez de espaço personagens. Para os números de ponto flutuante é ignorada se a precisão é explicitamente especificado. Para outras conversões usando esses resultados bandeira em um comportamento indefinido. É ignorado se - bandeira está presente.
    Original:
    0 : for integer and floating point number conversions, leading zeros are used to pad the field instead of space characters. For floating point numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional) valor inteiro ou * que especifica a largura de campo mínima. O resultado é preenchido com espaço personagens (por padrão), se necessário, à esquerda quando justificada à direita, ou à direita, se justificado à esquerda. No caso quando * é usado, a largura é especificada por um argumento suplementar de int tipo. Se o valor do argumento é negativo, o resultado com a largura do campo - sinalizador especificado e positivo.
    Original:
    (opcional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int. If the value of the argument is negative, it results with the - flag specified and positive field width.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional). seguido de um número inteiro ou * que especifica' precisão da conversão. No caso quando * é usado, o' precisão é especificada por um argumento suplementar de int tipo. Se o valor deste argumento é negativo, ele será ignorado. Consulte a tabela abaixo para efeitos exatos de precisão'.
    Original:
    (opcional). followed by integer number or * that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int. If the value of this argument is negative, it is ignored. See the table below for exact effects of precision.
    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
    Original:
    (opcional)length modifier that specifies the size of the argument
    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 hhh (none) llljztL
% writes literal %. The full conversion specification must be %%. N/AN/AN/AN/AN/AN/AN/AN/AN/A
c writes a single characterN/AN/Acharwchar_tN/AN/AN/AN/AN/A
s writes a character stringN/AN/Achar*wchar_t*N/AN/AN/AN/AN/A
d
i
converte 'decimal inteiro' um assinado no estilo [-] dddd.
Original:
converts a signed decimal integer in the style [-]dddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signedchar
signedshort
signedint
signedlong
signedlonglong
intmax_t
size_t
ptrdiff_t
N/A
o
converte um assinado 'inteiro octal' no estilo [-] oooo.
Original:
converts a signed octal integer in the style [-]oooo.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na execução alternativa' precisão é aumentada, se necessário, para escrever um zero inicial.
Original:
In the alternative implementation precision is increased if necessary, to write one leading zero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Nesse caso, se tanto o valor convertido ea precisão são 0, 0 único é escrito.
Original:
In that case if both the converted value and the precision are 0, single 0 is written.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A
x
X
converte 'inteiro hexadecimal' um assinado no estilo [-] hhhh.
Original:
converts a signed hexadecimal integer in the style [-]hhhh.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para as cartas de conversão xabcdef são used.
Original:
For the x conversion letters abcdef are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para as cartas de conversão XABCDEF são used.
Original:
For the X conversion letters ABCDEF are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão' especifica o número mínimo de dígitos que aparecem. A precisão padrão é 1.
Original:
Precision specifies the minimum number of digits to appear. The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa'0x ou 0X é prefixado para os resultados se o valor convertido é diferente de zero.
Original:
In the alternative implementation0x or 0X is prefixed to results if the converted value is nonzero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A
u
converte 'inteiro decimal sem sinal' um no estilo dddd.
Original:
converts an unsigned decimal integer in the style dddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precision' especifica o número mínimo de dígitos que aparecem.
Original:
Precision specifies the minimum number of digits to appear.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 1.
Original:
The default precision is 1.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se tanto o valor convertido ea precisão são 0 os resultados de conversão em nenhum caractere.
Original:
If both the converted value and the precision are 0 the conversion results in no characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unsignedchar
unsignedshort
unsignedint
unsignedlong
unsignedlonglong
uintmax_t
N/A
f
F
converte 'número de ponto flutuante à notação decimal no estilo [-] ddd.ddd.
Original:
converts floating-point number' to the decimal notation in the style [-]ddd.ddd.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 6.
Original:
The default precision is 6.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/A
double
double
N/AN/AN/AN/A
longdouble
e
E
converte número de ponto flutuante à notação decimal expoente.
Original:
converts floating-point number to the decimal exponent notation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão e [-] d.ddd'e ± dd é used.
Original:
For the e conversion style [-]d.ddde±dd is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão E [-] d.ddd'E ± dd é used.
Original:
For the E conversion style [-]d.dddE±dd is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O expoente contém pelo menos dois dígitos, mais dígitos são utilizadas, se necessário.
Original:
The exponent contains at least two digits, more digits are used only if necessary.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o valor for 0, o expoente é também 0.
Original:
If the value is 0, the exponent is also 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é 6.
Original:
The default precision is 6.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
a
A
converte número de ponto flutuante à notação hexadecimal expoente.
Original:
converts floating-point number to the hexadecimal exponent notation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão a [-]'0x h.hhh'p ± d é used.
Original:
For the a conversion style [-]0xh.hhhp±d is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o estilo de conversão A [-]'0X h.hhh'P ± d é used.
Original:
For the A conversion style [-]0Xh.hhhP±d is used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O primeiro dígito hexadecimal é 0 se o argumento não é um valor de ponto flutuante normalizada.
Original:
The first hexadecimal digit is 0 if the argument is not a normalized floating point value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o valor for 0, o expoente é também 0.
Original:
If the value is 0, the exponent is also 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Precisão especifica o número mínimo de dígitos que aparecem após o caractere de ponto decimal.
Original:
Precision specifies the minimum number of digits to appear after the decimal point character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A precisão padrão é suficiente para a representação exata do valor.
Original:
The default precision is sufficient for exact representation of the value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Na implementação alternativa' caractere de ponto decimal é escrita, mesmo que não dígitos segui-lo.
Original:
In the alternative implementation decimal point character is written even if no digits follow it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
g
G
converte 'número de ponto flutuante à notação decimal ou expoente decimal, dependendo do valor e da precisão'.
Original:
converts floating-point number to decimal or decimal exponent notation depending on the value and the precision.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para a conversão de conversão com estilo ge estilo ou f será performed.
Original:
For the g conversion style conversion with style e or f will be performed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para a conversão de conversão com estilo GE estilo ou F será performed.
Original:
For the G conversion style conversion with style E or F will be performed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Deixe P precisão iguais se 6, diferente de zero se a precisão não é especificado, ou 1 se a precisão é 0. Depois, se uma conversão com E estilo teria um expoente de X:
Original:
Let P equal the precision if nonzero, 6 if the precision is not specified, or 1 if the precision is 0. Then, if a conversion with style E would have an exponent of X:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • se P> X ≥ -4, a conversão é com estilo f ou F precisão e P - 1 - X.
    Original:
    if P > X ≥ −4, the conversion is with style f or F and precision P − 1 − X.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • caso contrário, a conversão é com estilo e ou E precisão e P - 1.
    Original:
    otherwise, the conversion is with style e or E and precision P − 1.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
A menos que' representação alternativa é solicitado os zeros à direita são removidos, também o caractere de ponto decimal é removido se nenhuma parte fracionária é deixado.
Original:
Unless alternative representation is requested the trailing zeros are removed, also the decimal point character is removed if no fractional part is left.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para o infinito e não um número de estilo conversão ver notas.
Original:
For infinity and not-a-number conversion style see notes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/AN/AN/AN/AN/A
n
retorna 'número de caracteres escritos' o até agora por esta chamada para a função.
Original:
returns the number of characters written so far by this call to the function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
O resultado é' escrito para o valor apontado pelo argumento.
Original:
The result is written to the value pointed to by the argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A especificação completa deve ser %n.
Original:
The complete specification must be %n.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/AN/Aint*N/AN/AN/AN/AN/AN/A
p writes an implementation defined character sequence defining a pointer. N/AN/Avoid*N/AN/AN/AN/AN/AN/A
'' Notas:
Original:
Notes:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
As funções de conversão de ponto flutuante converter infinito para inf ou infinity. Qual é usado é defined.
implementação
Original:
The floating point conversion functions convert infinity to inf or infinity. Which one is used is implementation defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não-um número é convertido para nan ou nan(char_sequence). Qual é usado é defined.
implementação
Original:
Not-a-number is converted to nan or nan(char_sequence). Which one is used is implementation defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
As conversões F, E, G, A saída INF, INFINITY, NAN vez.
Original:
The conversions F, E, G, A output INF, INFINITY, NAN instead.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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 dados para impressão
Original:
variable argument list containing the data to print
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

1-3)
Número de caracteres escritos, se o valor de sucesso ou negativa se um erro ocorreu.
Original:
Number of characters written if successful or negative value if an error occurred.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Número de caracteres escritos, se o valor de sucesso ou negativa se um erro ocorreu. Se a string resultante fica truncado devido ao limite buf_size, a função retorna o número total de caracteres (não incluindo a terminação nula bytes), que teria sido escrito, se o limite não foi imposta.
Original:
Number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to buf_size limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Exemplo

[editar]Veja também

impressões saída formatada para stdout, um fluxo de arquivo ou um tampão
Original:
prints formatted output to stdout, 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]
(C++11)
(C++11)
(C++11)
lê entrada formatada de stdin, um fluxo de arquivo ou um buffer
usando lista de argumentos variável
Original:
reads formatted input from stdin, 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]
Documentação C para vprintf, vfprintf, vsprintf, vsnprintf
close