Question #177949

create a file given "adress" with proper ios flags.. write 5 lines in the file and each line should have a student's data in the following format.

Name:adress:phoneNumber.

read the file and display all the numbers students data whose number starts with 0300.


Expert's answer

#include <iostream>
#include <fstream.h>

void main () {
  ofstream file;
  file.open ("egone.txt");
  file << "Writing to a file in C++....";
  file.close();
  getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS