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.
#include <iostream>
#include <fstream.h>
void main () {
ofstream file;
file.open ("egone.txt");
file << "Writing to a file in C++....";
file.close();
getch();
}
Comments
Leave a comment