Thanks for the code! But now I'm getting an "Empty Pointer in Main" error which points to the ent_create() function. How can I stop it happening?