Yes. Just open the file and process it as required - I'd create two functions (one for choice 1 one for choice 2) that process each file as necessary.

Code:

switch ( x )
{
case 1:
SearchPhoneBook();
break;

case 2:
EditPhoneBook();
break;

default:
cout<<"incorrect input";
cin.get();
break;
}

10-11-2005

elad

Each file stream can be associated with only one file at a time. However, you can have multiple file streams in any given project and you can change files associated with a given stream as long as you close the first file before associating the stream with the second file.