C++ Programming/Code/Standard C Library/Functions/gets

< C++ Programming < Code < Standard C Library < Functions

gets

Syntax
#include <cstdio>
char *gets( char *str );

The gets() function reads characters from stdin and loads them into str, until a newline or EOF is reached. The newline character is translated into a null termination. The return value of gets() is the read-in string, or NULL if there is an error.

Related topics
fgetc - fgets - fputs - puts
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.