Vankelmod
Joined: 05 Nov 2006 Posts: 10
|
Posted: Mon Mar 26, 2007 7:28 pm Post subject: Quick way of sorting content of .txts |
|
|
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. |
|