#include using namespace std; struct foundation { char name[40]; char city[40]; }; int main() { cout << "Enter dimension for foundations array: "; size_t n; cin >> n; struct foundation founds[2]; string query; for (int i = 0; i < n ; ++i) { cout << "Enter name / city" << endl; cin >> founds[i].name >> founds[i].city; } for (int i = 0; i < n ; ++i) { cout << founds[i].name << " - " << founds[i].city << endl; } cout << "Enter the name of the structure you want to delete." << endl; cin >> query; for (int i = 0; i < n ; ++i) { if (founds[i].name == query) { *founds[i].name = '\0'; *founds[i].city = '\0'; cout << "Structure with name " << query << " has been removed." << endl; } } for (int i = 0; i < n ; ++i) { if (*founds[i].name != '\0') { cout << founds[i].name << " - " << founds[i].city << endl; } } return 0; }