Something like the following:

(struct point){.x=1, .y=1}

This code doesn’t compile in C++. To add compound literals to a header aiming to support both C and C++, we can use the following macro:

#ifdef __cplusplus  
#define COMPOUND_LITERAL(T) T  
#else  
#define COMPOUND_LITERAL(T) (T)  
#endif

Reference