GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::gets(3) C++ Standard Libary std::gets(3)

std::gets - std::gets


Defined in header <cstdio>
char* gets( char* str ); (deprecated in C++11)
(removed in C++14)


Reads stdin into given character string until a newline character is found or
end-of-file occurs.


str - character string to be written


str on success, a null pointer on failure.


If the failure has been caused by end of file condition, additionally sets the eof
indicator (see std::feof()) on stdin. If the failure has been caused by some other
error, sets the error indicator (see std::ferror()) on stdin.


The function provides no means to prevent buffer overflow of the destination array,
given sufficiently long input string. std::gets was deprecated in C++11 and removed
from C++14.


std::fgets can be used instead.


scanf reads formatted input from stdin, a file stream or a buffer
fscanf (function)
sscanf
fgets gets a character string from a file stream
(function)
fputs writes a character string to a file stream
(function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.