|
|
@ -131,6 +131,10 @@ User** create_user_list(char* filename) {
|
|
|
|
char* token = malloc(sizeof(char) * 30);
|
|
|
|
char* token = malloc(sizeof(char) * 30);
|
|
|
|
User** users = malloc (num_users * sizeof(User*));
|
|
|
|
User** users = malloc (num_users * sizeof(User*));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i=0;i<num_users;i++) {
|
|
|
|
|
|
|
|
(*(users+i)) = malloc(sizeof(User));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
token = strtok(file_str," \r\n");
|
|
|
|
token = strtok(file_str," \r\n");
|
|
|
|
for (int i=0;i<num_users;i++) {
|
|
|
|
for (int i=0;i<num_users;i++) {
|
|
|
|
(*(users + i))->username = strdup(token);
|
|
|
|
(*(users + i))->username = strdup(token);
|
|
|
|