Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I assume that you're putting the <code>| tee.exe output.txt</code> string in the project property "Debugging | Command Argument".</p> <p>Unfortunately, that property only supports the redirection operators, not the pipe operator. If you have the <code>| tee.exe output.txt</code> string in the preoperty and run a program that dumps the command line arguments, you'll see that that information is just passed on as the arguments. The "Debugging | Command Argument" doesn't actually get processed by a full-fledged shell (such as <code>cmd.exe</code>) - it's just the IDE supporting some simple redirection (actually, it seems to support more than I expected):</p> <p>From <a href="http://msdn.microsoft.com/en-us/library/kcw4dzyf.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/kcw4dzyf.aspx</a>:</p> <pre><code>You can use the following redirection operators in this box: &lt; file Reads stdin from file. &gt; file Writes stdout to file. &gt;&gt; file Appends stdout to file. 2&gt; file Writes stderr to file. 2&gt;&gt; file Appends stderr to file. 2&gt; &amp;1 Sends stderr (2) output to same location as stdout (1). 1&gt; &amp;2 Sends stdout (1) output to same location as stderr (2). </code></pre> <p>You can have a limited version of what you're looking for by redirecting the program's output to a file using <code>&gt;&gt;</code> and using a <code>tail-f</code> command to display whatever gets added to the file. If you do this you'll probably want to call <code>setvbuf( stdout, NULL, _IONBF, 0 )</code> first thing in <code>main()</code> so that I/O is unbuffered. Otherwise <code>tail -f</code> won't see it until the buffer gets flushed, and I imagine that you'd like to see each output operation as it occurs.</p> <p>Another option is to crank the console window's "Screen Buffer Height" property up to a large number - one of the first things I do when I get a new Windows machine is set that value to 3000 or so - then debug the program normally and copy/paste the contents of the console window before it closes.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload