Bus error accessing char [] by index - OS X
Cam MacRae
cam.macrae at gmail.com
Tue Nov 6 13:56:26 PST 2007
Executing the following example program compiled with
> gdc stringtest.d -o stringtest
I get a bus error on OS X accessing the char array by index (shown in the comments below).
I imagine this might be a gdc on OS X issue - any other ideas?
import std.stdio;
void main() {
char[] firstname
firstname = "Cam";
char [] a = firstname, b = firstname;
a[0] = 'H'; //Bus error here
writefln(b);
}
cheers,
Cam.
More information about the Digitalmars-d
mailing list