c++ - Function reading file -



c++ - Function reading file -

it supposed read file , store in class variable. function ain't reading. problem here ?

void getgameinfo (const string fv, getinfo g[], int & questionn) { string gamesection, gamedificulty; int gamenumber; ifstream fd(fv); while(fd != 0) { fd >> gamesection >> gamedificulty >> gamenumber; g[questionn].takegame( gamesection, gamedificulty, gamenumber); fd.ignore(100, '\n'); questionn++; } }

you should reading next

while ( fd >> gamesection >> gamedificulty >> gamenumber ) { //... }

c++ ifstream

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -