struct assignment operator on arrays
- by Django fan
Suppose I defined a structure like this:
struct person
{
char name [10];
int age;
};
and declared two person variables:
person Bob;
person John;
where Bob.name = "Bob", Bob.age = 30 and John.name = "John",John.age = 25. and I called
Bob = John;
struct person would do a Memberwise assignment and assign Johns's member values to…