It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming C and C++ Forum

Quick way of sorting content of .txts

Quick way of sorting content of .txts

Postby Vankelmod on Mon Mar 26, 2007 6:28 pm

Hi, I was sitting here making boring lists in .txt files to use for my programs. I've copied and edited them so now the previously alphabetic order is really off. Since I'm lazy and the lists are close to fourthousand lines I figured there'd be an easier way to do it.

My general idea for a program was to read in the list line by line into a dynamic object <list> , sort it and spit them back out in order overwriting the old ones. But when I tried I couldn't get the ifstreams and ofstreams to work properly and since the program itself i so uncomplicated I figured I could just ask you to do it for me. If anyone of you c++ geniuses have a spare five minutes I'd like your help on this one. The contents of the files are of the syntax word, endline, word, endline and so forth.

Thanks in advance.
Vankelmod
 
Posts: 10
Joined: Sun Nov 05, 2006 2:59 pm

Who is online

Users browsing this forum: No registered users and 0 guests