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 Bob's.
But arrays can't assign to arrays, so how does the assignment of the "name" array work?