Is there a way to sort or search an outfile?

This is a discussion on Is there a way to sort or search an outfile? within the C++ Programming forums, part of the General Programming Boards category; Hello i was wondering if someone has a short minute, and might be able to give me an example of ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    Is there a way to sort or search an outfile?

    Hello i was wondering if someone has a short minute, and might be able to give me an example of how to sort and search an outfile, without a struct. I am not familar with a struct, if there is'nt a way. Can you then give me an example on how to sort and search a dynaminc array?

    Thank you very much

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Generally, you don't sort/search files. Generally, you download data from file to memory in your program and sort/search from there. There is no one way to do the download or the sort or the search. There is no best way to do those things either. Depends on the skill of the programmer, the tools the programmer has to work with, and how the file is set up.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Post an example of the kind of data the program deals. Does the program deal with texts or binary data?

    One solution is file-mapping.

    Kuphryn

  4. #4
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    couldnt you do a quicksort on it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using Vectors (cont) - Sort Problem
    By clegs in forum C++ Programming
    Replies: 2
    Last Post: 09-17-2007, 06:31 AM
  2. Replies: 3
    Last Post: 08-03-2007, 04:11 AM
  3. Firefox and Google Search
    By DeepFyre in forum Tech Board
    Replies: 0
    Last Post: 01-16-2005, 09:28 AM
  4. Simple search program
    By colinuk in forum C Programming
    Replies: 6
    Last Post: 12-18-2004, 12:58 AM
  5. can someone check this out and let me know ?
    By javaz in forum C Programming
    Replies: 5
    Last Post: 01-21-2002, 01:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21