stdout redirect

FreeSlave via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 12 06:12:06 PDT 2015


On Sunday, 12 April 2015 at 04:39:06 UTC, Philip Stuckey wrote:
> why not:
> import std.stdio;
> stdout = File(args[4], "w+");
> stderr = File(args[4], "w+");

It just replaces the object, not redirects output. E.g. if you 
use printf somewhere it will use stdout, not file.


More information about the Digitalmars-d-learn mailing list