Here's a generic bubble sort:
http://mathbits.com/mathbits/compsci/Arrays/Bubble.htm
You also need to look up strcmp which compares two strings, see for example:
http://www.cplusplus.com/reference/c...ng/strcmp.html
You may want to make sure that you truncate your strings to the 25 characters that you've allowed in the elements of your names array. You would typically do this with cin.read(char *buffer, int n) or use the setw function thus cin >> setw(25) >> name[i].
--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock:
http://charlieharvey.org.uk