i'll bet you $1 your pointers aren't being properly initialized.