← dlang

exforloop2.d

7436c22189e50ff0b69080024a3c4face849843c · ovidiucs · Sep 6, 2015 23:47

+1 −1 · 1 file changed

  • exforloop2.d +1 −1
diff --git a/exforloop2.d b/exforloop2.d
index 485f93d..3166efd 100644
--- a/exforloop2.d
+++ b/exforloop2.d
@@ -6,7 +6,7 @@ void main()
    char[] p;
    for (int z = 0; z < i; ++z)
    {
-      p += '*';
+      p[] ~= '*';
       writeln(p);
    }
 }