nvoid GetOutputFile(ofstream& OutFile){
string OutFileName;
RequestString("Enter output file name: ", OutFileName); // Get file name
OutFile.open(OutFileName.c_str()); // If a name was entered, try
to open the file
if (!OutFile){ // test if the open operation
is successful
cout
<< "Cannot open " << OutFileName << endl;
exit(1);
}
}