September 21, 2004 necessary? | ||||
---|---|---|---|---|
| ||||
why is it necessary that a local
char buf[20]="Hello";
compiles ok, but returns a runtime error:
Error: lengths don't match for array copy
Global and static initializations work as expected.
--
Helmut Leitner leitner@hls.via.at
Graz, Austria www.hls-software.com
|
September 21, 2004 Re: necessary? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Helmut Leitner | Helmut Leitner wrote:
> why is it necessary that a local
>
> char buf[20]="Hello";
>
> compiles ok, but returns a runtime error:
>
> Error: lengths don't match for array copy
>
> Global and static initializations work as expected.
Hmm. Something that fundamental should not be allowed
to compile.
|
Copyright © 1999-2021 by the D Language Foundation