Mcnamara,

The code you supplied didn't work unless I commented out the
qsort call.... once I did, it sucessfully wrote the patient data using
C++ (which makes me happy), although, its not sorted of course..

An unhandled exception of some kind...

A few things perhaps you can explain:
1.<sys/stat.h> What library this is and what it accomplishes pertaining to the code supplied.

2. qsort(first,nelem,sizeof(p),cmp );

Is qsort being defined in <sys/stat.h>?

I have been working with C++ for only a year... so code like
#define zout(y) memset(&y,0x00,sizeof(y))
kinda loses me fast...

Thanks for your input and time on this... It is really fascinating to see code like this acheive so much..