Score the race

Some number of teams are participating in a race. You are not told how many teams are participating but you do know:
-Each team has a name, which is one of the uppercase letters A-Z.
-No two teams have the same name, so there are a maximum number of 26 teams.
-Each team has the same number of members.
-No two runners cross the finish line at the same time –i.e. there are no tie

Input- gather a string of input from the user dictating the outcome of the race EX. "ZAZACC"

Output-The number of teams; Number or runners on each team; Names of the teams

I have no clue how to start this. I assume I must save the entire string into an array each character would go into an element, but how would I split each character out of the string and into an array?
Please Help

 
how would I split each character out of the string and into an array?


1
2
3
4
5
for (int i = 0; i < theString.size(); i++)
{
  char next_charcacter = theString[i];
  // do what you want with the character
  // ... 
Topic archived. No new replies allowed.