Why is this illegal in C? What is wrong with reinitializing p to a different posn? The same effect can be achieved by changing the field values individually so I don't understand why it can't be done in one step with p = {1, 2}.
struct posn {
    int x;
    int y;
};
int main() {
    struct posn p = {3, 4};
    p = {1, 2}; //Causes error
    // must do p.x = 1; p.y = 2;
    return 0;
}
 
     
     
    