I'm entering team names into a soccer league.
I have an array set up so that the league can take at most 4 teams,
I also have an array that states that the number of teams in the league is exactly 4 teams.
So I want to set up a counter which stops me from entering too many team names.
This is a small chunk of my code
str teamName
for(int i = 0; i < leagueSize; i++)
cout << "Enter a Team Name"<<endl'
cin >> teamName;
so is there a way for me to give a team name a value of 1 so that each time I enter a team name it decrements the number in the array until I can't add any more teams?
I am new at c++ and haven't been learning for that long so I might be totally off here.
Thanks in advance.