Sample input:
2000 Georgia Tech 30 Virginia 20
1999 Virginia 20 Virginia tech
My Problem is in taking the input in correctly. I take the year in correctly, but i'm having trouble with the names because some of them are two strings long.
right now i have
input << year << Winner1 << Winner2 < Score << Loser1 < Loser2 << Score
where Winner1, Winner2, and Loser1, Loser2, are all strings. The problem is that because they are strings they reading the score if the second word doesn't exist.
I realize i need some kind if statement comparing my string , but i'm stuck
there.
Thanks for any help
2000 Georgia Tech 30 Virginia 20
1999 Virginia 20 Virginia tech
My Problem is in taking the input in correctly. I take the year in correctly, but i'm having trouble with the names because some of them are two strings long.
right now i have
input << year << Winner1 << Winner2 < Score << Loser1 < Loser2 << Score
where Winner1, Winner2, and Loser1, Loser2, are all strings. The problem is that because they are strings they reading the score if the second word doesn't exist.
I realize i need some kind if statement comparing my string , but i'm stuck
there.
Thanks for any help
Comment