According to the documentation, readf
is supposed to return a uint
. But even this simple example fails to compile:
hello.d
import std.stdio;
void main() {
int x;
uint r = readf("%s", &x);
}
error message:
hello.d(5): Error: expression readf("%s",& x) is void and has no value
Am I missing something here?
I'm using dmd (Digital Mars D) compiler v2.050.