Espacios de nombres
Variantes
Acciones

std::gets

De cppreference.com
< cpp‎ | io‎ | c
 
 
Biblioteca de E/S
Manipuladores de E/S
E/S estilo C
Búferes
(en desuso en C++98)
Flujos
Abstracciones
E/S de archivos
E/S de cadenas
E/S de arrays
(en desuso en C++98)
(en desuso en C++98)
(en desuso en C++98)
Salida sincronizada
Tipos
Interfaz de categoría de error
(C++11)
 
 
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.

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 contrario
Original:
str on success, NULL otherwise
The text has been machine-translated via Google Translate.
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.

[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) [editar]
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) [editar]
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) [editar]