Program compiles, but segmentation fault.