One thing to rember, when you declare a structure, you should think it as a new data type.
Struct SomeStruct{
int data1;
int data2
};
Now SomeStruct is a data type, just like int or float.
You dont do something like float a;
float = 10;
You need to modify the variables, not the data type.
Similarly in your code you need to modify your variable(mystat s) and not the datatype(basket ball)
Struct SomeStruct{
int data1;
int data2
};
Now SomeStruct is a data type, just like int or float.
You dont do something like float a;
float = 10;
You need to modify the variables, not the data type.
Similarly in your code you need to modify your variable(mystat s) and not the datatype(basket ball)
Comment