How to split a string from a vector : <p>My homework is as follows:</p>

<p>Step Two - Create a file called connections.txt with a format like:</p>

<pre><code>Kelp-SeaUrchins
Kelp-SmallFishes
</code></pre>

<p>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:</p>

<pre><code>  cout &lt;&lt;  “pair  =  “ &lt;&lt; org1 &lt;&lt;  “ , “ &lt;&lt; org2 &lt;&lt; endl;
</code></pre>

<p>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. </p>
