//This program reads in a file line by line, sorts it, and outputs it to a //file. You may need to tweak it a little if for instance you have blank //lines, etc. I used a bubble sort because it's the easiest to remember. //If you need something faster, change that too! #include #include #include main() { typedef char str[80]; str game[1000]; int i=0; str filename; cout<<"Filename : "; cin>>filename; ifstream in(filename); while (!in.eof()) in.getline(game[i++],80,'\n'); in.close(); i--; cout<0) { str a; strcpy(a,game[y]); strcpy(game[y],game[y+1]); strcpy(game[y+1],a); } cout<<"Enter output file : "; cin>>filename; ofstream out(filename); for (int x=0; x