hello,
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
for example:
beth david mark helen
helen ben faheem eric
mavia sarah mindy
...etc
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?
fantum 0 Newbie Poster
Fbody 682 Posting Maven Featured Poster
fantum 0 Newbie Poster
Fbody 682 Posting Maven Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.