You need to add a new function to you Achievement class called find_highest().
Achievement find_highest(…)
Parameter: an array of objects
Hm... This is wrong. You cannot use an array as a parameter as you do not know the length of the said array.
You're using C++, not just C, so why not take advantage of the language elements and utilize the std::vector, instead of dealing with primitive arrays? The vector knows the number of elements in it (unlike the array), it's easy to add new elements to it. So it saves you from lot of troubles.
So the correct thing to do here would be either using two arguments for the new function: array and length; or just use the C++ way and use an std::vector.
Also, I wouldn't return an Achievement (copy of the original elements) but I'd return a (const) reference of the original elements
const Achievement & find_highest(const Achievement * array, size_t length)
{
// Implement your find logic that finds the index in array that's the highest score
return array[i];
}
And this is the alternative (which I would chose instead of the above)
const Achievement & find_highest(const std::vector<Achievement> & achievements)
{
// Implement your find logic that finds the index in array that's the highest score
return array[i];
}
Good luck and post your code if you get stuck.
Also, there's so much else that could be polished in your code. I'm happy to help with it if you're interested.