/*
Programmer: Jennifer Leopold
Date: April 6, 2018
File: rescue.cpp
Purpose: This file contains the definitions of the functions
associated with the Rescue information.
*/
#include "rescue.h"
using namespace std;
string RescueToString(const Rescue r)
{
string s = RESCUES[r].description;
return(s);
}
Rescue StringToRescue(const string s)
{
bool found = false;
int i = 0;
while ((i < NUM_RESCUES) && (! found))
if (RESCUES[i].description == s)
found = true;
else i++;
if (!found)
{
cout << "Did not find " << s << " in StringToRescue!\n";
exit(1);
}
return(RESCUES[i].code);
}