问题
I often see such representation of MAC address in C code:
struct mac_addr {
unsigned char bytes[6];
}
Why necessary put an array in a structure, why not just have an array? What benefit does this provide?
Thanks.
回答1:
You can't assign an array in C. But you can assign a struct.
来源:https://stackoverflow.com/questions/19482750/representation-of-mac-address-in-c-code