Sunday, August 2, 2009

Alphabetizing c++?

Input: A file named "unsorted.txt" that includes a list of words separated by spaces.





Output: A file named "sorted.txt" that includes the original list, a wordcount, and the words alphabetically sorted.





Requirements:





You may use any sorting algorithm.


You must give the complete algorithm you chose as part of the algorithm for your complete program.


Tips:





This website gives C code for several algorithms sorting numbers:


Example Files:





unsorted.txt





run jump play





sorted.txt





run jump play


wordcount = 3


jump play run





here's the code that i have written:

Alphabetizing c++?
You never called the bubbleSort() function from main()


No comments:

Post a Comment