C:的使用和QUOT;静态"一个结构内
问题描述:
是合法的有一个C结构中的静态的成员?
Is it legal to have a "static" member within a C struct?
例如
struct my_struct {
int x;
static int y;
};
如果它确实是合法的,那么什么是静态关键字的用法的含义是什么?
If indeed it is legal,then what are the implications of the usage of the "static" keyword?
在此先感谢
MNO。
Thanks in advance Mno.
答
没有,那将毫无意义的C.它是有效的在C ++中虽然。
No, that would make no sense in C. It's valid in C++ though.