August 27, 2004 Array initializing causes segfault | ||||
---|---|---|---|---|
| ||||
# import std.stdio; # # void main() # { # char ch = ' '; # char[] u; # u.length = 3; # # int i = 2; # # writefln("a"); # u[0..2] = ch; # writefln("b"); # u[0..i] = ch; # writefln("c"); # } Output: (on linux) a b Segmentation fault Nick |
Copyright © 1999-2021 by the D Language Foundation