std::gets
Da cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido no cabeçalho <cstdio> | ||
char*gets(char*str ); | (obsoleta) | |
Lê stdin em cadeia de caracteres dada até que um caractere de nova linha é encontrada ou de fim-de-arquivo ocorre.
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.
Índice |
[editar]Parâmetros
str | - | cadeia 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
em sucesso, NULL contrárioOriginal:
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
A verificação de limites não é realizada, pois esta função é extremamente vulnerável a ataques de estouro de buffer. Use
fgets()
vez.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]Veja também
lê entrada formatada de stdin, um fluxo de arquivo ou um tampão Original: reads formatted input from stdin, a file stream or a buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função) | |
recebe uma cadeia de caracteres a partir de um fluxo de arquivo 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. (função) | |
escreve uma seqüência de caracteres para um fluxo de arquivo 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. (função) | |
Documentação C para gets |