|
|
|
|
|
by mytherin
1298 days ago
|
|
Perhaps I am missing something in the spec - but trying this in various compilers, it seems that you *can* assign structs holding arrays to one another, but you *cannot* assign arrays themselves. This compiles: struct BigStruct {
int my_array[4];
};
int main() {
struct BigStruct a;
struct BigStruct b;
b = a;
}
But this does not: int main() {
int a[4];
int b[4];
b = a;
}
That seems like an arbitrary restriction to me. |
|