You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
338 B
C
19 lines
338 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include "user.h"
|
|
|
|
User new_user(char* name,char* pass) {
|
|
User newUser;
|
|
|
|
newUser.username = malloc((strlen(name)+1)*sizeof(char));
|
|
|
|
newUser.password = malloc((strlen(pass)+1)*sizeof(char));
|
|
|
|
|
|
strcpy(newUser.username,name);
|
|
strcpy(newUser.password,pass);
|
|
|
|
return newUser;
|
|
}
|