compiles okay, segmentation fault.  broken pointers somewhere