well what do you want to do? sprintf should work...here's an example of how to do this kinda stuff:
Code:
struct info_{
char name[30];
int age;
}info[4];
int main(void)
{
sprintf(info[0]->name,"Jimmy Olsen");
info[0].age = 23;
sprintf(info[1]->name,"something");
info[1].age = 49;
sprintf(info[2]->name,"something else");
info[2].age = 63;
sprintf(info[3]->name,"Joe bob");
info[3].age = 47;
sprintf(info[4]->name,"Mary Poppins");
info[4].age = 10;
for(int x=0;x<4;x++)
printf("%s\n%d\n",info[x]->name, info[x].age);
return 0;
}
or you could get the name/age from the user by using...
Code:
printf("Enter name: ");
gets(info[x]->name);
printf("enter age: ");
scanf("%d",&info[x].age);
that help at all?