I suggest you run your code through a debugger like gdb to figure out where the segmentation fault is. Satish