My homework is as follows:
Step Two - Create a file called connections.txt with a format like:
Kelp-SeaUrchins
Kelp-SmallFishes
Read these names in from a file and split each string into two (org1,org2). Test your work just through printing for now. For example:
cout << “pair = “ << org1 << “ , “ << org2 << endl;
I am not sure how to split the string, that is stored in a vector, using the hyphen as the token to split it. I was instructed to either create my own function, something like int ind(vector(string)orgs, string animal) { return index of animal in orgs.} or use the find function.