I have an algorithm that is churning out a bunch of factors that I need to manage. Currently it is a simple cout that when running merely scrolls on the console page. Obviously it is impossible to capture the numbers because of the scroll. So I would like to have a more manageable output.
If this could be outputted to a file that I could open that would satisfactory. Could that be Notepad or could a spreadsheet like Excel or Microsoft Works Spreadsheet be used?
Or could the console window just hold the values such as in a table? Could you sort the information based upon the numerical value?
Currently the output (format) looks like:
937 / 785
X factors: 3.04, 0.43
Y factors: 0.32, 3.04
Unix consoles have 3 streams, stdin, stdout and stderr, in C++ these map onto cin, cout and cerr respectively. These can all be redirected at the console.
The main reason for this is to chain programs together to do the job of a larger custom app. For example, if you wanted to sort your output, you'd redirect it into sort.
e.g.
yourapp | sort
Or if you wanted to see the output as it went past, but only lines starting with error
yourapp | tail -f | grep '^error'
Microsoft's console has been incrementally improved over the decades and can even seperate stdout from stderr. But you won't have the Unix or GNU tools available. There's sort and more but not much else.
The early GNU tools were compiled as native win32 apps, these days no one bothers. Cygwin or MKS Toolkit or some other Unix-like environment tends to be used.