somewhere in a sequential file would require that the entire file be rewritten.
It is possible,
however, to add data to the end of a file without rewriting the file.
Adding data to the end of an existing file is called appending.
//open file for appending
|//add names and ages
to an existing file
If the file you open for appending does not exist, the
operating system creates one just as if you had opened it using ios::out
apstring name, dummy;
int number, i, age;
many names do you want to add?";
open file for appending
assert (!fout.fail( ));
fout<<name<<endl; //send to
fout.close( ); //close