谁知道这个结构体的语法是怎么回事。(结构体语法?)
typedef struct ts
{
short flag;
[switch_is(flag)] POINT p;
[case(24)]
float fMays;
}s1;
s1 s;
s.fMays=3;
在sdk下运行能过。但不知switch_is是干什么的,case(24)是怎么回事。
我在msdn上查到以下帮助集:
Visual C++ Attributes Reference
Typedef, Enum, Union, and Struct Attributes
Visual C++ Attributes Reference
Class Attributes
列出很多关键字,其中就有switch_is.
这些关键字都是什么意思,有什么用。是否说明struct与class有属性这一说呢?