#ifdef __cplusplus # ifdef __GNUC__ # define restrict __restrict__ // G++ has restrict # else # define restrict // C++ in general doesn't # endif #endif
extern "C99"
。 - pmgstruct XY a = { .x = 1, .y = 2 };
在 extern "C" 块内部无法编译通过:_error: expected primary-expression before ‘.’ token_,真是令人沮丧!相反,过时的形式struct XY a = { x: 1, y: 2 };
却可以工作。疼! - gatopeich