din.readf("%s", &floattype) should work?

Michael P. baseball.mjp at gmail.com
Fri Jan 29 07:48:52 PST 2010


Is din.readf (from std.cstream in Phobos) able to read floats when using %s as the format specifier?
When I used this:
din.readf( "%s", &somedouble );
somedouble will still be nan after receiving input from the user.
But when I use:
din.readf( "%f", &somedouble );
everything goes as planned.
Is this to be expected?



More information about the Digitalmars-d-learn mailing list