Hello,
I just got my hands on a copy of TDPL and I like the book and D is very
promising. But I run into problems with the easiest of program. I just
want to write to and from a stream, just the way it is possible with
C++ stringstreams. But this program produces an empty line as
output.
/** begin program
import std.stdio;
import std.stream;
void main() {
auto stream = new MemoryStream( );
string s = "this is a line";
stream.writeLine(s);
char[] get = stream.readLine();
writeln(get);
}
// end of program
Why? Whats the right way to do it?
Greetings, Tobias