Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void readScores(score s[10],const string scoresfile)
- {
- ifstream scores(scoresfile);
- if (scores)
- {
- for (int i = 0; i < 10; i++){
- getline(scores, s[i].name);
- scores >> s[i].points >> s[i].area >> s[i].ships;
- }
- scores.close();
- }
- else cout << "ERROR: Scores file not found!" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement