Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo
- Code: Select all
using namespace std;
string s;
getline(cin,s,'\t');
why are there some names in the list that are repeated ?
How should we handle them ?
PS: tokxx doesn't work so I cant tell you how many tokens my prog has. I just type "tokxx contest39.cpp" and nothing is displayed.
Dante Shamest wrote:why are there some names in the list that are repeated ?
Some students have more than one assignment given to them.How should we handle them ?
Check if the name already exists, and add the score to that name.
Kybo_Ren wrote:I used a map.
Curse you, Alvaro! Stop giving away our secrets! ;-)Alvaro wrote:
- Code: Select all
getline(cin,s,'\t');
Kybo_Ren wrote:Then I used fin >> score to read the score into my integer for score. Then I did a fin.ignore(1000,'/n') to ignore everything until the newline, just in case.
Users browsing this forum: No registered users and 0 guests