// CSE143 Sp01 Homework 1 Sample Solution // placelist.h - interface to PlaceList data structure and functions // HP 4/01 #include using namespace std; const int MAX_PLACES = 30; // maximum # of places in the list struct Place { // description of a single place: double x, y; // x and y coordinates string name; // place name }; struct PlaceList { // list of places and locations: Place list[MAX_PLACES]; // list entries are in list[0..size-1] int size; }; // Make places an empty PlaceList void makePlaceListEmpty(PlaceList &places); // Add place with given name and x, y coordinates to places void addPlace(PlaceList &places, double x, double y, string name); // Look for name in places. If found, store coordinates in x, y // and set found = true; if not found set found = false. void findCoordinates(PlaceList &places, string name, double &x, double &y, bool &found);