Menu
Home
Create new Paste
Log in
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
void main() { class A { public int id = 42; } A a1 = new A(); int[A] array; array[new A()] = 42; array[a1] = 23; import std.stdio; writeln(array); foreach (key, val; array) { writeln(key.id); } A at = array.keys[0]; at.id++; foreach (key, val; array) { writeln(key.id); } }
Result:
Success
/
Return code: 0
/
Compilation time:
0.325
seconds
/
Run time:
0.001
seconds
Application output:
[c271.main.A:42, c271.main.A:23]
42
42
43
42
Username
Message
Add comment
Paste info
Author:
Namespace
Views:
106
Private:
no
Expires:
Never
Uploaded:
17.09.12 15:38
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.060
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason