Reading whitespace separated strings from stdin?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 20 18:46:52 PDT 2015
I think this should work:
import std.stdio;
void main() {
string token;
while(readf("%s ", &token))
writeln(token);
}
Have you tried that? What is wrong with it if you have?
More information about the Digitalmars-d-learn
mailing list