okay i've been avoiding this topic for a long time simply because it's a bit scary (hold me :().

Okay I get the basic drift of it but I'm not really seasoned in it.

lets say I have defined a struct and I want to create a new struct on the fly, I understand now that I need to set memory aside for it. I believe when using malloc it returns a pointer to that memory location. Can someone please give me a simple example of how to do that?

Also i'm noticing that sometimes I want different size arrays. Again memory allocation is the key to this as well. Can someone give me a simple example of how to allocate memory for a varying array?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.