When I run this for some reason i get: terminate call after throwing an instance of 'std:: length_error' what(): basic_string::resize
This application ahs requested the runtime to terminate in an unusual way. please contact the applications support team for more information...
1 2 3 4 5 6 7
//x.resize(x.length-1)// str.resize (14);
for(int i = 0; i < length; i++){
string city = hr[i].address.city;
int length = hr[i].address.city.length()-1;
city.resize(length);
hr[i].address.city = city;
}