how to append this info
instead of overwriting existing file
#include<iostream.h>
#include<fstream.h>
void main()
{
char first_name[25];
char last_name[25];
char subject[15];
char sector;
//now setup a file stream
//firstly a name and input file
ifstream infile;
//now associate it with a file
infile.open("B:\\persons.txt");
infile>>first_name;
infile>>last_name;
infile>>subject;
infile>>sector;
//now read it!!!!
infile.close();
//display
cout<<endl<<"first_name:-"<<first_name;
cout<<endl<<"last_name:-"<<last_name;
cout<<endl<<"subject:-"<<subject;
cout<<endl<<"sector:-"<<sector;
cout<<endl<<endl;
}//end program