nothing good and you can see that...I don't now how to make program to cout the students name last name and grades sorted from highest grade to lowest...
Please edit your post and make sure your code is [code]between code tags[/code] so that it has syntax highlighting and line numbers, as well as proper indentation.
Are you allowed to use std::vector and std::sort? If so, it will be pretty simple. If not, you're in for some pain.
Yes I am allowed,but is not simple for me because this first time that i met with programing and I don't now functions very good in the any program language ...
Then, you'll want to store the students in a std::vector inside your main function:
1 2 3 4 5
int main()
{
std::vector<Student> students;
//...
}
To add students, you would create a temporary student object, prompt the user to input values into it, and then copy it into the vector with .push_back().
When you want to sort by grades, you can create a comparison function to use in std::sort:
1 2 3 4 5
bool highest_grade_average(Student const &a, Student const &b)
{
//take the average of each student's grades
//return true if a has a higher average than b, false otherwise
}
This is not a homework solutions site. We don't do immoral things like that here. Many colleges and universities have strict policies: having others complete your assignments will likely get you expelled.
We are perfectly willing to help you to learn how to do it yourself. We will not do it for you - it is wrong.