You need to tell
how to compare the two structs. since there's no default comparison for non basic types. Do you want to sort by name or by grade, or by grade then by name, or ...?
Probably the easiest way is to add an operator< method to the struct:
bool operator<(const struct StudentDataTypes& other) const
return name < other.name;
see further details here: std::sort - cppreference.com