Struct List Human

Adam D. Ruppe destructionator at gmail.com
Sun Sep 24 18:00:32 UTC 2017


I think readf("%s") reads everything available. readf(" %s\n") 
might help but personally, I say avoid readf.

Just use readln and to!int instead


auto line = readln();
if(line.length == 0)
    writeln("please enter a number");

age = to!int(line);


to is from import std.conv


More information about the Digitalmars-d-learn mailing list