共用方式為


編譯器錯誤 C3065

在非類別範圍不允許屬性宣告

備註

屬性 __declspec 修飾詞用在類別外部。 屬性只能在類別內宣告。

Example

下列範例會產生 C3065:

// C3065.cpp
// compile with: /c
__declspec(property(get=get_i)) int i;   // C3065

class x {
public:
   __declspec(property(get=get_i)) int i;   // OK
};