pesky pointer problems...

You would need char ** or a reference.

Thanks Wildbill, I'm not being lazy here but could you please be a little more explicit about how to get this working, I've only just got my head around pointers(*) and addresses(&) and I'm not sure what char** means (is this a pointer to a pointer?). I've already spent some time expereimenting with char** but haven't got anything to work.

Or, just keep the original function as is and return null if the phone number is not found.

This is in fact what I've done, just to get my project working, but being a pig-headed so-and-so I'd still like to get the d4mn function to work!