Address problem
Gheorghe Gabriel
knoppy273 at live.com
Tue Oct 24 17:47:39 UTC 2017
Hi,
---------------------------------------------------
interface I { }
I[string] i;
class C : I {
this() {
i["s"] = this;
foreach (_i; i) {
writeln(&_i);
}
foreach (ref _i; i) {
writeln(&_i);
}
}
}
void main() {
C c = new C;
writeln(&c);
}
---------------------------------------------------
output:
19FDD8
2802028
21FE58
---------------------------------------------------
I need that I["s"] to have the same address like c.
More information about the Digitalmars-d-learn
mailing list