This sort seems to work the first time it is run, but if i run it a second time, it sorts the array in the opposite direction, and so on. Any ideas?
for (j = 0; j < i - 1; j++)
for (x = i - 1; x > j; --x)
if (VideoData[x-1].videocat < VideoData[x].videocat)
{
tmp = VideoData[x-1];
VideoData[x-1] = VideoData[x];
VideoData[x] = tmp;
}
// then print statements