typedef struct
{
string color;
int age;
}Dog;
int main(void)
{
Dog cookie = ("brown", 6);
cookie.color = "blue";
cookie.age = 12;
}
Hello, I'd like to know if there's a way to edit multiple structure values as such, while only using a single line instead of repeating "structName.varName" over and over.
Would there be a similar method for changing multiple values for objects in C as well? Thank you so much.