I have a problem with reading input. I'm supposed to read team names from an input file, but I'm having a problem with reading teams with 2 names. For example, input is like this:
MNU ManchesterUnited A
BAR Barcelona A
RMA Real Madrid B
OL Lyon A
GLA Glasgow Rangers B
Group names come after the team names. I try to read them with
fscanf(filePtr, "%s %s %c", teams[x].teamAbbr, teams[x].teamName, teams[x].group);
this, but if a team has 2 names(like Manchester United), it reads only Manchester with %s, then %c gets a character from United... Any solutions?


Sign In
Create Account

Back to top









