Here's my code....
Code:
int file_write(int points, string names)
{
int dd = 0;
int po;
int done = 0;
string high;
ifstream in( "highscore.txt" );
string name[5];
string point[5];
while (in >> name[dd] >> point[dd]) {
StringToInt(point[dd], po);
if (points > po && done == 0) {
name[dd] = names;
point[dd] = points;
done = 1;
}
cout << name[dd] << " " << point[dd] << "\n";
dd++;
}
in.close();
cin.get();
cin.get();
return 0;
}
It's really wierd because the new points from the player becomes a heart. :S
Why?