C++ Reading file

tutorial and example
tutorial and example

C++ File Handling read() Function

In file handling, read() function is used to read data from file into program. The read() uses ifstreamlibrary to read data from file.

Syntax

Example

C++ File Handling read() Function Example

Reading content of existing file ’employee.txt’.

Output: