my input is in the following format:
<year><TAB><win ner><tab><score ><tab><runner-up><tab><score> <newline>
where year and scores are all intergers and the Winner and Runner-UP are just strings. The problem is both strings may or may not contain spaces.
I need to write the programming in C++ to intake this data, and then place it into either 4 arrays or...
User Profile
Collapse
-
Comparing Strings to INTS
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... -
okay i want to keep the scores as well, but the problem is i'm having trouble with schools whose name is longer then one word. -
arrays
Using C++ language I need to write a program that first separates the data into arrays for year, Winner, Winner's score, Runner-up, Runner-ups score. I’m having trouble putting all my data into arrays. later I will have to search through the data using the searches from input 2. Where the first term means what to search by, then the value of that search, and if followed by 1 the output the winner, if 2 output the loser.
... -
Thanks worked perfectly, but i've got another problem.
Sample input:
Men's track Results
=============== =============== =============== ==
1999 Danbury 30 Trinity Catholic 35
2000 Ridgefield 80 Staples High School 50
I want my program to read the year, and then the names of the schools and ignore the scores. The trouble i'm having is with the names of the schools being more then...Leave a comment:
-
String trouble
I'm need my program to read the entire first line from a program. and then write it to an output file.
ex: Men's Track Meet
thus far i can only get it to read Men's
this is using the C++ language
thanks
No activity results to display
Show More
Leave a comment: