If i have a customer record in a file how do i delete a customer record from that file if i have two customer name john doe but they have different phone numbers.Basically I want to know how to use the name and phone number to delete customer record from the file. Here is my code.

```
void deleteCustomerData() {
  string name, customerInfo, customerData;
  string email;
  string phoneNumber;
  string address;
  string deleteCustomer;

  int skip = 0;

  cout << "Enter the name of the Customer record you want to delete: " << endl;
  getline(cin, name);
  cout << "Enter the phone number of the Customer record you want to delete: " << endl;
  getline(cin, customerData);

  ifstream customerFile;
  ofstream tempFile;
  int tracker = 0;
  customerFile.open("customer.txt");
  tempFile.open("tempCustomer.txt");

  while (getline(customerFile, customerInfo)) {
    if ((customerInfo != name) && !(skip > 0)) {
      if ((customerInfo != "{" && customerInfo != "}")) {
        if (tracker == 0) {
          tempFile << "{" << endl << "{" << endl;
        }
        tempFile << customerInfo << endl;

        tracker++;
        if (tracker == 4)
        {
          tempFile << "}" << endl << "}" << endl;
          tracker = 0;
        }
      }
    }
    else
    {
      if (skip == 0)
        skip = 3;
      else
        --skip;
    }
  }
  cout << "The record with the name " << name << " has been deleted " << endl;
  customerFile.close();
  tempFile.close();
  remove("customer.txt");
  rename("tempCustomer.txt", "customer.txt");
}

```