phobos: What type to use instead of File when doing I/O on streams?
J.Frank via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 9 01:48:31 PST 2015
My question is now:
How can I make this work without using deprecated stuff?
import std.cstream;
void foo(InputStream in_stream, OutputStream out_stream)
{
// in_stream.seek(3); // compile error - good :)
char[] line;
while ((line = in_stream.readLine()) !is null)
out_stream.writeLine(line);
}
void main(string[] args)
{
foo(din, dout);
}
More information about the Digitalmars-d-learn
mailing list