Problem: Write a program that determines which of 5 geographic regions within a major city (north, south, east, west, central) had the fewest reported traffic accidents last year. it should also have this function called by main.
int getNumAccidents()is passed the name of a region. it asks the user fro the number of accidents in that region during the last year and returns it. It should be called once for each city region.
this is my code.
using namespace std;
int getNumAccidents(string &);
int getNumAccidents(string ®ion)
cout << "How many accidents were reported in " << ®ion << "?" << endl;
cin >> number;
Here is my problem. When the program asks the question 'how many accidents were reported in _____ region', instead of showing me the name of the region, it shows me the memory address of the string variables (north, south, etc.) I don't know how to show the names of the regions themselves. How do I make it so that I see the names of the regions and not the memory addresses?