So i am messing in C not C++ sorry please don't burn me by the cross but i am trying to make a little player customization menu thing just to practice with structs and every time i try to output a thing eg person.name it gives off like 125123156312
#include "stdafx.h"
#include <stdio.h>
char * var1;
char * var2;
char * var3;
int var4;
int var5;
// Clotrhing Vars;
int cvar1;
int cvar2;
int cvar3;
int cvar4;
int cvar5;
int cvar6;
typedefstruct {
char dogname[100];
char * dogbreed;
int dogage;
char * dogdob;
} dog;
typedefstruct {
char name[32];
int skinc[32];
int facialhair;
int scars;
} person;
int main()
{
person person;
printf("What's your character's name?\n");
fgets(person.name, 32, stdin);
char * pname = person.name;
printf("\nWhat's your character's skin color?");
fgets(person.skinc, 32, stdin);
char * pskin = person.skinc;
printf("\nOk, %d This is your character cumtomization menu!\n", pname);
printf("What would you like for head wear?\n");
printf("[1] A helmet\n");
printf("[2] Special hat\n");
printf("[3] A helicopter hat\n");
printf("[4] A baseball cap\n");
printf("[5] Beanie\n");
printf("[6] Painted Beanie\n");
printf("Please select 1: ");
fgets(cvar1, 10, stdin);
printf("Your character is a %d named %d wearing ", pskin, pname);
return 0;
}
// Outputs
Ok, 6223712 This is your customization menu.
Rather than: Ok, Jimmy this is your customization menu.