Re: BitArray crash

2015-01-30 Thread Nicholas Wilson via Digitalmars-d-learn
I think I have to set "length" first. Yes. Declaring BitArray b; is like declaring int[] a; // ={.length = 0, . ptr = null} you get the segfault for invalid dereference.

BitArray crash

2015-01-30 Thread Danny via Digitalmars-d-learn
Hi, I'm trying to use BitArray instead of rolling my own. But how does one use it? I tried: import std.bitmanip : BitArray; int main() { BitArray b; b[2] = true; return 0; } $ gdc l.d $ gdb a.out (gdb) r Program received signal SIGSEGV, Segmentation fault. 0x