| |||||
| Dernière réponse | |
|---|---|
| Sujet : [C - Linux] problème avec scanf | |
| [SDF]Poire | Gets
Syntax #include <stdio.h> char *gets(char *s); Description Gets a string from stdin. gets collects a string of characters terminated by a new line from the standard input stream stdin and puts it into s. The new line is replaced by a null character (\0) in s. gets allows input strings to contain certain whitespace characters (spaces, tabs). gets returns when it encounters a new line; everything up to the new line is copied into s. The gets function is not length-terminated. If the input string is sufficiently large, data can be overwritten and corrupted. The fgets function provides better control of input strings. Note: For Win32s or Win32 GUI applications, stdin must be redirected. Return Value On success, gets returns the string argument s. On end-of-file or error, it returns NULL Borland C++ 5.0 Programmer's Guide |
| Vue Rapide de la discussion |
|---|