for (it = AirportMap.begin(); it != AirportMap.end(); ++it)
{
cout << "\nAirport Code " << it -> second.airportCode
<< "\tCity " << it -> second.city
<< "\tphoneNum " << it -> second.phoneNum;
}
Note that currently, your key is a blank string: ret = air.insert ( pair< string, Airport> (airportCode, ai) ); // airportCode is never set to anything
Thanks for the help Repeater. I am getting an error on the line 'for (it = AirportMap.begin(); it != AirportMap.end(); ++it'. The error is an 'unexpected type name 'AirportMap': expected expression'.
How would I fix the airportCode issue and set the key to the appropriate string?