3
私はDLang(関数へのポインタ)で関数ポインタを使用しようとしていますが、コンパイルできません。関数ポインタを作成する際のWeb上のすべてのコードは、私のためには機能しません。これは私のコードです:D2:関数ポインタはコンパイルされません
tqvar function(tqlist)[string] procs;
procs["divide"] = ÷/// cannot implicitly convert expression (&this.divide) of type tqvar delegate(tqlist args) to tqvar function(tqlist) (QScript)
tqvar divide(tqlist args){
tqvar result;
result.ii = true;
result.d = args.read(0).d/args.read(1).d;
return result;
};
私はubuntuでdmd2を使用しています。
[Works](http://dpaste.dzfl.pl/d21fd09780db)です。 – sigod