>>You should really figure this out yourself
Yes, the OP should have a go on their own. If they don't know about structures, there's little point in providing sorting code. Walk before run, remember?

Besides, your sort code doesn't compile and is wrong anyway.