More D newb questions.
Janice Caron
caron800 at googlemail.com
Wed May 7 21:11:14 PDT 2008
On 07/05/2008, Me Here <p9e883002 at sneakemail.com> wrote:
> Sorry to be pedantic in response, but in what way does it work?
>
> import std.stdio;
>
> void main() {
> char a = 'a', b = 'b';
> writefln( a ~ b );
> }
> c:\dmd\test>dmd junk3.d
> junk3.d(5): Error: Can only concatenate arrays, not (int ~ int)
By giving a compile error, of course. That's how it's /supposed/ to
work. It's telling you to fix your code, e.g. to
void main() {
char[] a = ['a'], b = ['b'];
writefln( a ~ b );
}
More information about the Digitalmars-d
mailing list