C++ Reading file

C++ File Handling read() Function

In file handling, read() function is used to read data from the file into the program. The read() uses ifstream library to read data from a file.

Syntax

Example

C++ File Handling read() Function Example

Reading the content of existing file ’employee.txt’.

Output:

Leave a Comment