generate functionSun, 26 Feb 2023

typedef struct character_ { char name[NAME_SIZE]; char clan_name[NAME_SIZE]; char sire_name[NAME_SIZE]; char disciplines[NUM_DISCIPLINES][NAME_SIZE]; char bane[NAME_SIZE]; int generation; } Character; typedef struct clan_ { char name[NAME_SIZE]; char disciplines[NUM_DISCIPLINES][NAME_SIZE]; char faction[NAME_SIZE]; char bane[NAME_SIZE]; } Clan; typedef struct sire_ { char name[NAME_SIZE]; char clan_name[NAME_SIZE]; int generation; } Sire; #include <stdio.h> #include <string.h> #define NAME_SIZE 50 #define NUM_DISCIPLINES 3 int main(){ char pj_name[NAME_SIZE]; char sire[NAME_SIZE]; printf("Please, give your character's name: "); fgets(pj_name, NAME_SIZE, stdin); pj_name[strlen(pj_name)-1] = '\0'; printf("Please, give your sire's name: "); fgets(sire, NAME_SIZE, stdin); sire[strlen(sire)-1] = '\0'; createCharacter(pj_name, sire); // PROCEDURE TO CREATE return (0); }

function that:

Questions about programming?Chat with your personal AI assistant