Write your question here.I need to enter the desired group and sort alphabetically the names of students in this group.Explain how to do this sort,please.
Why do you use C-strings instead of std::strings? The latter would simplify the rest of the code.
Your lines 50-52 are wrong, if you are supposed to sort the students. The line 48 correctly determines the need to swap by name, but you have to swap entire student objects, not just their names.
However, as long as you have char arrays in your struct (and don't overrride copy constructor and copy assignment) that will fail. The easiest way is to use std::string instead of char arrays.