typedef struct Custom{ string name; int level; }; vector inputList; void readCustom(){ ifstream fin("custom.inp"); Custom tempCustom; vector::iterator it; while(!fin.eof()) { fin >> tempCustom.name >> tempCustom.level ; inputList.push_back(tempCustom); if(inputList.size()==1) {cout