1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
GetInfo()
{
ifstream data("playerdata.csv");
if (!data)
{
cout << "Could not find file, please re-enter" << endl;
return false;
}
else
{
string name,team,age, nation, pos, from, to, transferFee;
int aAge[30];
getline(data, name);
getline(data, team);
getline(data, age);
getline(data, nation);
getline(data, pos);
getline(data, from);
getline(data, to);
getline(data, transferFee);
for (int i = 0; i < 30; ++i)
{
aAge[i] = age.at(i);
}
return true;
}
return false;
}
|