Jose Atariguano

Generation

translateSat, 08 Apr 2023

crear una lista de objetos

typedef struct { char *name; int age; int height; int weight; } Person; Person *Person_create(char *name, int age, int height, int weight) { Person *who = malloc(sizeof(Person)); assert(who != NULL); who->name = strdup(name); who->age = age; who->height = height; who->weight = weight; return who; }

Questions about programming?Chat with your personal AI assistant