taqya wrote:
Hi,i write this code. then d compiler is shutdown.
Is it a array bug?

//Digital Mars D Compiler v2.014 (windows)
import std.stdio;
int main()
{
        char[] a = "a".dup;
        char[] b = "b".dup;
        writefln(a + b); //Error: Array operations not implemented
return 0; }

'+' implies you're trying to add "a" and "b" together e.g.
(char)((int) 'a' + (int) 'b')

If so, the error informs you why you can't do that.

If you're trying to concatenate, use the '~' operator.

assert ( "a" ~ "b" == "ab" );

Reply via email to