C++

Objectives :

  • myfstream_readtext3.cpp
           ifstream readtext1("data2.txt");
           readtext2.open("data2.txt");
  • fstream open(), close, read() and getline()
  • Code: myfstream_readtext3.txt
 

Step: 1 Create a source file.

Step: 2 Edit and save Source file

Step: 3 Runtime Views:

Step: