I have an assignment for my one class at school where I am supposed to write a program that creates lists of people who have met. Each line of input is a space-separated list of the names of people who have met. If a person is in a group with someone, they have met and should be on each other's contact list. The input is multiple lines of groups of people terminated by end-of-file
beth david mark helen
helen ben faheem eric
mavia sarah mindy
I am allowed to use any C++ data structures, and I was planning on using a map of strings and sets like map<string, set<string> >,
but I really don't know how to separate the names to store in the sets. Can anyone help me?