Espacios de nombres
Variantes
Acciones

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

De cppreference.com
< cpp‎ | io‎ | c
 
 
 
 
Definido en el archivo de encabezado <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)
Carga los datos de los lugares, definidos por vlist, los convierte a equivalentes de cadenas de caracteres y escribe los resultados a una variedad de fregaderos .
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)
Escribe los resultados 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)
Escribe los resultados en un archivo .. stream corriente
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)
Escribe los resultados en un buffer cadena de caracteres .
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)
Escribe los resultados en un buffer cadena de caracteres. En la mayoría de los personajes buf_size se escriben. La cadena de caracteres resultante se termina con un carácter nulo, a menos que buf_size es cero .
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.

Contenido

[editar]Parámetros

stream -
flujo de salida de archivos para escribir
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 -
puntero a una cadena de caracteres a escribir
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 escribir
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 -
puntero a una cadena de caracteres terminada en cero que especifica cómo interpretar los datos.
La cadena de formato se compone de espacios en blanco, caracteres sin espacios en blanco (excepto %) y especificaciones de conversión. Cada especificación de conversión tiene el siguiente 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ácter introductorio
    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) una o más banderas que modifican el comportamiento de la conversión:
    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.
  • -: el resultado de la conversión es justificado a la izquierda en el campo (por defecto es justificado a la derecha)
    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.
  • +: el signo de conversiones firmados siempre se antepone al resultado de la conversión (por defecto el resultado es precedida por menos sólo cuando es 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.
  • Espacio: si el resultado de una conversión con signo no comienza con un carácter de signo, o está vacío, el espacio se antepone al resultado. Se ignora si la bandera 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 de la conversión se lleva a cabo. Consulte la tabla siguiente para efectos exactos .
    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 conversiones de números enteros y de punto flotante, ceros a la izquierda se utilizan para rellenar el campo en lugar de espacio caracteres. Para los números de punto flotante se ignora si la precisión se especifica explícitamente. Para las conversiones de usar este resultado pabellón en un comportamiento indefinido. Se ignora si la bandera 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 entero que especifica o * ancho mínimo de campo. El resultado se rellena con caracteres de espacio' (por defecto), si es necesario, a la izquierda cuando se justifica a la derecha o por la derecha si alineado a la izquierda. En el caso cuando se utiliza *, la anchura es especificado por un argumento adicional de int tipo. Si el valor del argumento es negativo, se produce con el ancho de bandera - campo específico y 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 un número entero o * que especifica' precisión de la conversión. En el caso de que * se utiliza, el' precisión se especifica un argumento adicional del tipo int. Si el valor de este argumento es negativo, se ignora. Consulte la tabla siguiente para los efectos exactos de precisión' .
    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) longitud' modificador que especifica el tamaño del 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.
  • conversión de formato 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.
Los especificadores de formato disponibles son las siguientes:
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
convierte "entero decimal 'a firmado en el 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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
convierte una firmado "un entero octal 'en el 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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.
En la implementación alternativa' precisión aumenta si es necesario, para escribir uno cero 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.
En ese caso, si tanto el valor convertido y la precisión son 0, 0 solo está 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
convierte "entero hexadecimal 'a firmado en el 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 las letras x conversión abcdef son 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 las letras X conversión ABCDEF son 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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.
En la implementación alternativa'0x o 0X se antepone a los resultados si el valor convertido es distinto de cero .
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
convierte una 'entero sin signo decimal' en el 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 el número mínimo de dígitos que aparecen .
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.
La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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
convierte 'número de punto flotante' a la notación decimal en el 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante' a la notación decimal exponente .
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 el estilo de conversión e [-] d.ddd'e ± dd es 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 el estilo de conversión E [-] d.ddd'E ± dd es 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.
El exponente contiene al menos dos dígitos, más dígitos se utilizan sólo si es necesario .
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.
Si el valor es 0, el exponente es también 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante' a la notación hexadecimal exponente .
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 el estilo de conversión a [-]'0x h.hhh'p ± d es 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 el estilo de conversión A [-]'0X h.hhh'P ± d es 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.
El dígito hexadecimal primera es 0 si el argumento no es un valor normalizado de punto flotante .
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.
Si el valor es 0, el exponente es también 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es suficiente para la representación exacta del 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante a la notación decimal o exponente decimal, dependiendo del valor y la precisión' .
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 la conversión g estilo conversión con e estilo o f se performed.
ser
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 la conversión G estilo conversión con E estilo o F se performed.
ser
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.
Vamos P igual a la precisión si 6 distinto de cero, si la precisión no se especifica, o 1 si la precisión es 0. Entonces, si una conversión con E estilo tendría un exponente 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.
  • si P> X ≥ -4, la conversión es con estilo f o F y precisión 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.
  • de lo contrario, la conversión es con estilo e o E y precisión 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' representación alternativa se pidió a los ceros finales se eliminan, también el carácter de punto decimal se elimina si no parte fraccionaria se deja .
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 el estilo de conversión infinito y no un número-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
devuelve 'número de caracteres escritos' el hasta el momento por esta llamada a la función .
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.
El resultado es' escrito al valor apuntado por el 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.
La especificación completa debe 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
'Nota':
Original:
Notes:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Las funciones de conversión de punto flotante convertir el infinito hasta inf o infinity. ¿Cuál se utiliza es defined.
implementación
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.
No-un número-se convierte en nan o nan(char_sequence). ¿Cuál se utiliza es defined.
implementación
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.
Las conversiones F, E, G, A salida INF, INFINITY, NAN lugar .
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.
La cadena de formato se compone de espacios en blanco, caracteres sin espacios en blanco (excepto %) y especificaciones de conversión. Cada especificación de conversión tiene el siguiente 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ácter introductorio
    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) una o más banderas que modifican el comportamiento de la conversión:
    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.
  • -: el resultado de la conversión es justificado a la izquierda en el campo (por defecto es justificado a la derecha)
    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.
  • +: el signo de conversiones firmados siempre se antepone al resultado de la conversión (por defecto el resultado es precedida por menos sólo cuando es 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.
  • Espacio: si el resultado de una conversión con signo no comienza con un carácter de signo, o está vacío, el espacio se antepone al resultado. Se ignora si la bandera 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 de la conversión se lleva a cabo. Consulte la tabla siguiente para efectos exactos .
    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 conversiones de números enteros y de punto flotante, ceros a la izquierda se utilizan para rellenar el campo en lugar de espacio caracteres. Para los números de punto flotante se ignora si la precisión se especifica explícitamente. Para las conversiones de usar este resultado pabellón en un comportamiento indefinido. Se ignora si la bandera 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 entero que especifica o * ancho mínimo de campo. El resultado se rellena con caracteres de espacio' (por defecto), si es necesario, a la izquierda cuando se justifica a la derecha o por la derecha si alineado a la izquierda. En el caso cuando se utiliza *, la anchura es especificado por un argumento adicional de int tipo. Si el valor del argumento es negativo, se produce con el ancho de bandera - campo específico y 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 un número entero o * que especifica' precisión de la conversión. En el caso de que * se utiliza, el' precisión se especifica un argumento adicional del tipo int. Si el valor de este argumento es negativo, se ignora. Consulte la tabla siguiente para los efectos exactos de precisión' .
    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) longitud' modificador que especifica el tamaño del 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.
  • conversión de formato 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.
Los especificadores de formato disponibles son las siguientes:
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
convierte "entero decimal 'a firmado en el 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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
convierte una firmado "un entero octal 'en el 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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.
En la implementación alternativa' precisión aumenta si es necesario, para escribir uno cero 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.
En ese caso, si tanto el valor convertido y la precisión son 0, 0 solo está 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
convierte "entero hexadecimal 'a firmado en el 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 las letras x conversión abcdef son 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 las letras X conversión ABCDEF son 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.
Precision' especifica el número mínimo de dígitos que pueden aparecer. La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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.
En la implementación alternativa'0x o 0X se antepone a los resultados si el valor convertido es distinto de cero .
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
convierte una 'entero sin signo decimal' en el 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 el número mínimo de dígitos que aparecen .
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.
La precisión predeterminada es 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.
Si tanto el valor convertido y la precisión son 0 los resultados de la conversión en ningún carácter .
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
convierte 'número de punto flotante' a la notación decimal en el 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante' a la notación decimal exponente .
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 el estilo de conversión e [-] d.ddd'e ± dd es 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 el estilo de conversión E [-] d.ddd'E ± dd es 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.
El exponente contiene al menos dos dígitos, más dígitos se utilizan sólo si es necesario .
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.
Si el valor es 0, el exponente es también 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante' a la notación hexadecimal exponente .
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 el estilo de conversión a [-]'0x h.hhh'p ± d es 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 el estilo de conversión A [-]'0X h.hhh'P ± d es 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.
El dígito hexadecimal primera es 0 si el argumento no es un valor normalizado de punto flotante .
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.
Si el valor es 0, el exponente es también 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.
' La precisión especifica el número mínimo de dígitos que aparecen después del carácter de punto 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.
La precisión predeterminada es suficiente para la representación exacta del 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.
En la implementación alternativa' carácter de punto decimal se escribe incluso si no hay cifras que siguen .
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 el estilo de conversión infinito y no un número-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
convierte 'número de punto flotante a la notación decimal o exponente decimal, dependiendo del valor y la precisión' .
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 la conversión g estilo conversión con e estilo o f se performed.
ser
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 la conversión G estilo conversión con E estilo o F se performed.
ser
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.
Vamos P igual a la precisión si 6 distinto de cero, si la precisión no se especifica, o 1 si la precisión es 0. Entonces, si una conversión con E estilo tendría un exponente 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.
  • si P> X ≥ -4, la conversión es con estilo f o F y precisión 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.
  • de lo contrario, la conversión es con estilo e o E y precisión 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' representación alternativa se pidió a los ceros finales se eliminan, también el carácter de punto decimal se elimina si no parte fraccionaria se deja .
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 el estilo de conversión infinito y no un número-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
devuelve 'número de caracteres escritos' el hasta el momento por esta llamada a la función .
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.
El resultado es' escrito al valor apuntado por el 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.
La especificación completa debe 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
'Nota':
Original:
Notes:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Las funciones de conversión de punto flotante convertir el infinito hasta inf o infinity. ¿Cuál se utiliza es defined.
implementación
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.
No-un número-se convierte en nan o nan(char_sequence). ¿Cuál se utiliza es defined.
implementación
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.
Las conversiones F, E, G, A salida INF, INFINITY, NAN lugar .
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 variable que contiene los datos que desea imprimir
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 si el valor de éxito o negativo si ocurre un error .
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 si el valor de éxito o negativo si ocurre un error. Si la cadena resultante se trunca debido al límite buf_size, la función devuelve el número total de caracteres (sin incluir el carácter terminador nulo-byte) que se han escrito, si el límite no se impuso .
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]Ejemplo

[editar]Ver también

Imprime la salida formateada para stdout, una secuencia de archivo o un búfer.
(función)[editar]
(C++11)(C++11)(C++11)
lee la entrada con formato de stdin, una secuencia de archivo o una buffer
con lista de argumentos variable
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.

(función)[editar]
Documentación de C para vprintf, vfprintf, vsprintf, vsnprintf
close