Почему может крашится сортировка?
void doSort()
{
unsigned int StudentsCount = 0;
Student * students = new Student[StudentsCount];
int temp;
float ResultMark;
for (int i = 0; i < StudentsCount - 1; i++)
{
for (int j = 0; j < StudentsCount - 1; j++)
{
if (students[j].ResultMark > students[j + 1].ResultMark)
{
temp = students[j].ResultMark;
students[j].ResultMark = students[j + 1].ResultMark;
students[j + 1].ResultMark = temp;
}
}
}
for (int j = 0; j<StudentsCount; j++)
{
cout<<"Rezyltat sortirovki"<<students[j].ResultMark<<" ";
}
cout<<endl;
}