This looks like a case where using a comma separated file, or some other symbol not likely to be used in the struct data members would be useful. That way you can use getline with a comma (or whatever) as the delimiter.
Code:
//declare C++ style struct type
struct EditDetailsType
{
int iBookingNumber;
string sFirstName;
string sSurName;
//etc
}
//declare array of EditDetailsType
const int MAX = 10;
EditDetailsType Booking[MAX];
//write array to file after obtaining data
for(int i = 0; i < MAX; i++)
{
file << "BOOKING #: " << ',' << Booking[i].iBookingNumber << "\n";
file << "CUSTOMER NAME: " << ',' << Booking.sFirstName << ',' << Booking.sSurname << "\n";
//etc
File will look like this:
Booking #: ,12345
CUSTOMER NAME: ,Joey,Brown
//etc
//now to read in the file do this:
EditDetailsType Recall[MAX];
char dummy[80];
ifstream fin("filename");
for(i = 0; i < MAX; i++))
{
//read and discard up to first comma
fin.getline(dummy, 80, ',');
//read in booking number
fin.getline(Recall[i].iBookingNumber, 80, '\n');
//read and discard up to next comma
fin.getline(dummy, 80, ',');
//read in FirstName
fin.getline(Recall[i].sFirstName, 80, ',');
//read in SurName
fin.getline(Recall[i].sSurName, 80, '\n');
//evaluate SurName
if(Recall[i].sSurName == "Brown")
{
//do something
cout << Recall[i].iBookingNumber << " is for a " <<
Recall[i].sFirstName << ' ' << Recall[i].sSurName << endl;
}
//etc.