Vector of objects search for future objects' use?
<p>I have data file which is being read into a vector. Example :</p>

<pre><code>West Ham 38 12
Leicester City 38 13
</code></pre>

<p>In actual file there is more doubles followed the name. Anyways, previously I've used this kind of search:</p>

<pre><code>vector&lt;Team&gt;newTeams; //vector of Team objects

string homeName;
cout &lt;&lt; "Enter home team name: ";
cin &gt;&gt; homeName;
cout &lt;&lt; endl;

Team ht;

for(Team team : newTeams)
{
    if(team.getName() == homeTeam)
    {
       ht = team;
    }
}
</code></pre>

<p>Basically I go through a vector and look for a specific team name. If I found team name, I assigned team to ht. Then, I would use ht to get needed data, i.e.:</p>

<pre><code>ht.getHomeGamesPlayed();
ht.getPoints();
ht.getHomeGoalsScored();
</code></pre>

<p>So, my question is: is there a better way for search?(Use map of names + vector of doubles?):</p>

<pre><code>map&lt;name, vector&lt;doubles&gt;&gt;;
</code></pre>

<p>Also, how do I make search case insensitive? i.e I type in leicester instead of Leicester CIty, and Leicester City would still get picked?  </p>

<p><strong>UPD:</strong> 
Seems like I figured it out, here's the code if you're interested:</p>

<pre><code>string homeName;
cout &lt;&lt; "Name: " &lt;&lt; endl;
cin &gt;&gt; homeName;

Team ht;

for (Team team : dataTable) {
    if (strstr(team.getName().c_str(), homeName.c_str()))
    {
        ht = team;
    }
}
</code></pre>

<p>So when I type Leic it picks Leicester City(when I type leic, it doesn't work though)  </p>