std::gets
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <cstdio>
|
||
char *gets( char *str ); |
(en desuso) | |
Lee stdin en cadena de caracteres dada hasta un carácter de nueva línea se encuentra o se produce al final de su archivo .
Original:
Reads stdin into given character string until a newline character is found or end-of-file occurs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
str | - | cadena de caracteres a ser escrito
Original: character string to be written 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
str
en caso de éxito, NULL lo contrarioOriginal:
str
on success, NULL otherwiseThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Notas
La comprobación de límites no se realiza, por lo que esta función es extremadamente vulnerable a los ataques de desbordamiento de búfer. Utilice
fgets()
lugar .Original:
The bounds checking is not performed, therefore this function is extremely vulnerable to buffer-overflow attacks. Use
fgets()
instead.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ver también
lee la entrada con formato desde stdin, una secuencia de archivo o un tampón Original: reads formatted input from stdin, a file stream or a buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | |
recibe una cadena de caracteres a partir de una secuencia de archivo Original: gets a character string from a file stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | |
escribe una cadena de caracteres en una secuencia de archivo Original: writes a character string to a file stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | |
Documentación de C para gets
|