Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Merging Help

  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Merging Help

    I am trying to do external sort right now and I am running into problems. I can sort chunks of a really huge text file and place them into separate smaller files, but I am having a problem figuring out how to sort them. I have an idea of just reading the first word of each smaller file and compare to see which one is smaller and output that word to a final file, then implement to read the 2nd word from that smaller file compare to the first words of the remaining smaller files and so on. Ultimately the final file would have all sort words from these smaller files. The main problem is I am not sure what kind of method I should use to read the files in this manner. I originally used scanner but scanner doesn't keep a pointer or what I have read once I leave the loop, can someone please help.

  • #2
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am doing a similar project.

  • #3
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    By the way I my smaller files are only separated by spaces, so I cant use readline either.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •