Prompting using stdio

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 28 07:16:29 PDT 2014


I thought

int main(string[] args)
{
     import std.stdio;
     write(`Press enter to continue: `);
     stdout.flush;
     auto line = readln();
     writeln("Read ", line);
     return 0;
}

would function as a good prompting but it doesn't.

I outputs the string given to write *after* I've pressed return. 
Why?


More information about the Digitalmars-d-learn mailing list