Sorry if this isnt what u need but i've been up all night and i havent used C++ in 2 weeks. Its sketchy but i could improve/comment/edit it if u need. I was trying not to make it exact to what u need just give u a place to start and something to look at.
Code:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
int score[10],
largest;
char name[20];
ofstream outfile;
ifstream infile;
largest = score[0];
for (int i = 0; i < 10; i++)
{
cout << "Enter score: ";
cin >> score[i];
if (largest < score[i])
{
largest = score[i];
}
}
cout << "Largest score was " << largest << endl;
cout << "Enter name for score: ";
cin >> name;
outfile.open("c:\\hscore.txt");
outfile << largest << " " << name << endl;
outfile.close();
cout << "High Score and Holder: " << endl;
cout << "\n";
cout << largest << " " << name << endl;
cout << "\nThis information has been saved to file!" << endl;
return 0;
}