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