I am currently working on a project for class that reads in from a .txt file the names of a film, the year it was made, and the list of actors in said film, and sorts the info in a binary search tree. In the tree nodes, I have the actors organized in a singly linked list. So far my program can read everything in from the file, store it into the tree, it can print out all the titles of the movies and only the titles, and it can ask a user to input a year and it will print out all the movies released before that year from the list.
What I'm currently trying to do is make it so the user can enter the name of an actor, and the program will go through the linked list in each node, and if the name is found, it will print out the title of that movie. I've never used the Standard C++ Library before because my instructors chose not to teach it.
Could anyone give me some ideas as to how I can accomplish this? Any help would be appreciated.
Traverse the tree like you do in print_titles(). Instead of outputting the title, iterate over the actor container checking for the name that is input. If a match is found output the title.