std::gets
Материал из 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. |
| Заголовочный файл <cstdio>
|
||
| char *gets( char *str ); |
(устарело) | |
Читает stdin в заданную строку символов до символа новой строки будет найден, или конец файла происходит.
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.
Содержание |
[править] Параметры
| str | - | символьная строка должна быть написана
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. |
[править] Возвращаемое значение
str на успех, NULL иначеOriginal:
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.
[править] Notes
Проверка границ не выполняется, поэтому эта функция чрезвычайно уязвимы для переполнения буфера атак. Используйте
fgets() вместо.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.
[править] См. также
| читается форматированный ввод из stdin, поток файл или буфер 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. (функция) | |
| получает строку символов из файла потока 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. (функция) | |
| пишет символьная строка в файле поток 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. (функция) | |
| C документация для gets
| |