I tried to make a program (in VS 2019) that prints out each values of certain characters, but it doesn't seem to work well. When executed, it prints out the number '0', regardless of which I entered.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct value //Value for each characters
{
char tier;
int weight;
float airspeed;
float fallspeed;
float fastfall;
float dash;
}V;
V mario; //I set 'Mario' as a variable.
V mario; tier = 'A';
V mario; weight = 98;
V mario; airspeed = 1.208f;
V mario; fallspeed = 1.5f;
V mairo; fastfall = 2.4f;
V mario; dash = 1.76f;
int main(void)
{
printf("%d", mario.weight); //mario.weight is '98'.
return 0;
}
I thought that "mario.weight" would be printed as '98', but when I executed it printed '0'.