Minggu, 09 Oktober 2016

How to read and write data in files in C++

After opening a connection to the file, reading and writing data to the file is an easy task. We can write data using the following syntax: opfile<<data;   In the above syntax, opfile is the object of ofstream and data is any variable holding data. We can read data from a file using the following syntax: ipfile>>data;   In the above syntax, ipfile is the object of ifstream and data is any variable into which the data is stored to process in the program.   Note: When a file is opened for writing data into it, if the specified file is not there, a new file with the same name is created and

The post How to read and write data in files in C++ appeared first on Coding Security.


How to read and write data in files in C++
read more

Tidak ada komentar:

Posting Komentar