// help with assignment 3
#include <iostream>
#include <cstdlib>
#include <map>
using namespace std;

void printPath(map<string,string> m, string,string);
int main()
{
   map <string,string> m;  // stores (child,parent) relationship
   //  bill is parent to sue and jane
   m.insert(make_pair("sue","bill"));
   m.insert(make_pair("jane","bill"));
   // sue is parent to andy, sally and james
   m.insert(make_pair("andy","sue"));
   m.insert(make_pair("sally","sue"));
   m.insert(make_pair("james","sue"));
   // jane is parent to sam and john
   m.insert(make_pair("sam","jane"));
   m.insert(make_pair("john","jane"));
   // get the idea?
   // they are all single-parent families by the way
   // now you can insert the next generation
   // sally is parent to rob and julie
   // sam is parent to tom and anne
   //                    bill
   //                  /       \
   //             sue           jane
   //          /   |   \       /   \
   //      andy sally james   sam  john
   //             /  \       /  \
   //         rob  julie  tom anne


   printPath(m,"bill","tom");
   // should display bill jane sam tom
   printPath(m,"bill","julie");
   // should display bill sue sally julie
}

void printPath(map<string,string> m, string start, string goal)
// displays the path from start to goal
// needs to be recursive or to use a stack as you will start with 
// goal and find goal's parent and then find the parent of goal's parent etc
// but need that order to be reversed in output.
{
// complete this function as you will need it for your assignment
}
