I have a struct defined as :
typedef struct pt {
int x;
int y;
}point;
I also have a stack push function declared as :
void push(point p);
Now whenever i wish to call this function, I can do the following :
point p = {x_value, y_value};
push(p);
I wanted to know if there is a less cumbersome workaround for this. Something which could enable me to do this in a single line. Maybe something like :
push((point){x_value, y_value});
push((point){x_value, y_value});to see if it works?