Hey im back-
Ok i have to store in some names and id numbers into arrays from an inputfile desired by the user, and then those arrays will be stored into a record. I started list(as an array of the names and idnumbers) and then league[] which has all the lists in it. Am i just doing this backward or am i missing something simple? Thanks.
I know count has to go in there somewhere- that is why I started with league[count].first but that didnt work either. Help!Code:void storenames(ifstream& inputfile, playerrecords& list, int& count) { count=0; inputfile >> list.first; while(list.first != SENTINEL) { inputfile >> list.last >> list.idnum; count++; inputfile >> list.first; } for (int i=0; i < count; i++) cout << list.first << list.last << list.idnum << count << endl; }



LinkBack URL
About LinkBacks


