“keyword”:只能在定义中使用
关键字在声明中使用了,但仅在定义中有效。
下面的示例生成 C3197:
// C3197.cpp
// compile with: /clr /c
ref struct R abstract; // C3197
ref struct R abstract {}; // OK
public ref class MyObject; // C3197
ref class MyObject; // OK
public ref class MyObject {}; // OK