Namespaces
Variants
Actions

std::scanf, std::fscanf, std::sscanf

From cppreference.com
< cpp‎ | io‎ | c
 
 
 
C-style I/O
Types and objects
Functions
File access
Direct input/output
Unformatted input/output
Formatted input
scanffscanfsscanf
(C++11)(C++11)(C++11)    
(C++11)(C++11)(C++11)    
 
Defined in header <cstdio>
int scanf( const char* format, ... );
(1)
int fscanf( std::FILE* stream, const char* format, ... );
(2)
int sscanf( const char* buffer, const char* format, ... );
(3)

Reads data from a variety of sources, interprets it according to format and stores the results into given locations.

1) Reads the data from stdin.
2) Reads the data from file stream stream.
3) Reads the data from null-terminated character string buffer.

Contents

[