Quote Originally Posted by hhmatt81 View Post
I'm just realizing that I've mislead you guys. The title is meant to say filtering not sort. Was late last night when I wrote this.

That is an interesting idea streaker but I don't have anything sql on my pc as far as I know. Is mysql what you had in mind or something else?

Im not positive but I seem to remember reading somewhere that c++ has problems reading to and from a sql database, can anyone with more experience here confirm this?
Filter = where clause in sql, sort = sort in sql, it doesn't really matter.

MySQL can be installed on a Windows box.

The only thing I can see using C++ for is changing all the spaces in the text files to line feeds (so each row is a word), but there's probably easier ways to do that too.
Edit - MySQL has tools for this, as does Oracle and I'm assuming SQL Express likely does too:

I'm sure you're interested in learning C++ or something but this really seems like re-inventing the wheel. Perhaps you're some kind of Uber Programming Personage but it seems doubtful that you're going to come up with something which is more optimized that a database w/ query parser/execution.

Also in your posted code you tested that the input file opened successfully but you didn't check that your output file did.