5
根据documentation,readf
应该返回uint
。但是,即使这个简单的例子不能编译:为什么readf没有返回值?
hello.d的
import std.stdio;
void main() {
int x;
uint r = readf("%s", &x);
}
错误消息:
hello.d(5): Error: expression readf("%s",& x) is void and has no value
我在这里失去了一些东西?
我正在使用dmd(数字火星D)编译器v2.050。
这样做,谢谢。 – 2011-03-31 20:49:18