C - Sorting a data file - Need Help !!!I have a small C program that reads in a file and prints out the contents fine. The problem is with sorting that data and getting it to print. What prints out is garbage information, but what numbers of garbage that are printed are sorted, if that helps. Please let me know what I'm missing. I'm using a simple bubble sort and the code is roughly 50 lines. I'm not sure where the data being sorted is coming from, but basically, I need to know how to read in from a file and sort that information to print/or write to another file. Please help !! 1 Reply: |  adamlum | How is the data in the first file formatted, are they character strings, numbers, what?
What are you using to store the inputted data in, just an array? A little more information I think is needed if we are going to be able to help you out...
|
|