Referencing an object within a structure using a string

Hi, newbie here with what I believe is a pretty basic question. I'm trying to have the following code take the team selection input from a user and index it with one of the team names (objects) in my team structure so that I can get the currentPlayerCount associated with that team name.

I'm getting an error associated with my last line of code. Can someone tell me what I'm doing wrong?

Thanks AbstractionAnon. I'll use code tags for subsequent posts. I also have a terminating main but failed to paste it into my original post. My bad.

Following up on my initial question, what I'm attempting to do is have the the player's input from the "Select A Team" prompt be used to match up with the identity of a specific team in the team structure. For example, if someone inputs "UniversityofAlabama", then one of the the outputs would read Current Roster Size: 80. I tried to do this by having their input be called "teamSelection" but where my code is messed up is I don't know how to match "teamSelection" up with one of the teams listed in my team structure. I think this might be a really basic concept that I'm not familiar with yet, but I'm not sure.

Eventually I want to set this up as a drop down menu, but I think I need to walk before I can run.

Following up on this topic, say I have a long list of objects of a certain structure. In the example below, I only have 3, but imagine this list is in the hundreds. Is there a way to have user input enable a specific object so that I don't have to do hundreds of "if" statements as I have started to do below? For example, could you do something like cin >> player.rank and then use that input so that if you typed cout << player.name the console would return the player's name whose rank was input by the user? Just thinking there must be a more elegant solution than creating hundreds of if's.

Thanks, I thought I used code tags but I must have done something wrong. New here. Anyway, I didn't fully follow your response as I have not gotten to vectors yet.

I think what I'm trying to do is simple but maybe not.

All I'd like to do is take the input from "cin" that relates to one of the structure's members (for example, player rank) and, based on that input, look up which player is being referred to, and then output one of the other characteristics (members) of that same player.