Your full service technology partner! 
-Collapse +Expand
Search C++ Group:

-Collapse +Expand C++ To/From
-Collapse +Expand C++ Study Test
-Collapse +Expand C++ Store

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyC++ BoardC Language Topic   Print This     

C - Sorting a data file - Need Help !!!

C - Sorting a data file - Need Help !!! in C Language topic (part of our C++ group).

Quick Search: Sorting   C Sorting   C Sorting data   file   
-- USA
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 !!
 Posted 17 years ago (Thread Starter)
Comment Quote
About shoto516 -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #11042, 1 replies
Thread Started 3/27/2005 12:35:00 AM
View Counter=4985
Last Reply Posted 6/22/2007 7:15:14 PM)
Location=-- USA 
Joined=17 years ago   MB Posts=1  
Most Recent Post
Adam Lum
Prestwood IT
Citrus Heights, CA

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...

Adam Lum
Senior Programmer
Prestwood Software

 Posted 15 years ago
Comment Quote
About Adam Lum -Collapse +Expand
Visit Profile
Approved member.
Member does not subscribe to this thread.
About Adam Lum

Adam Lum is a part time developer for Prestwood Software and participates in this online community when time allows. His day-to-day work is C# coding but his current intrests (right now) are Ruby on Rails and iOS programming with Objective-C.  He has also coded several projects in Java, C++, ASP Classic, and PHP.  His personal website can be found at

Post ID #11927 (Level 1.1)  Reply to 11042
Thread Started 6/22/2007 7:15:14 PM
View Counter=2
Location=Citrus Heights, CA 
Joined=16 years ago   MB Posts=31   KB Posts=23   KB Comments=4   BLOG, Topics=1  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1183A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #11042 Counter
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2022 Prestwood IT Solutions.   [Security & Privacy]