Answer to Question #177949 in C++ for sulman

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.


1
Expert's answer
2021-04-03T14:34:44-0400
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS