Original Post
Hi, This is an edited post as I solved my own problem (gosh I can be stupid!)
My *new* question is "Is this a safe way to do what I'm doing?" and is it correct? (should I use return instead? if so how?)... I want to make sure there are no memory leaks mainly.
I have a structure like so
struct PERSON
{
int age;
char name[11];
}
and I create an array like so
PERSON Peep[3];
and I want a function to fill out the details so I do this:
void UpdatePeeps(PERSON * Peep)
{
strcpy(Peep[0].name, "Fred");
Peep[0].age = 20;
strcpy(Peep[1].name, "JOE");
Peep[1].age = 10;
strcpy(Peep[2].name, "BILL");
Peep[2].age = 29;
}
Thanks
sorry about the edit
[edited by - redoc on December 4, 2002 11:30:47 PM]