Hi,
I would like to make a database with users.
But I take errors in the function
Could someone help me please?
My code is :
typedef struct user user;
int id2=0;
struct user
{
char name[20];
char last[20];
int id;
};
int function(user* users, int id, char name[], char surname[]){
user* u = users+id2;
strcpy(u->name,name1);
strcpy(u->surname,surname1);
u->id=id2;
}
main()
{
char name1[20];
char surname1[20];
users[50];
if(function(users, id,name1,surname1))
++id2;
// and then I would like to print name,surname,id form created struct ..... ??
}
Thanks a lot