共用方式為


編譯器錯誤 C3633

無法將 'member' 定義為Managed 'type' 的成員

CLR 參考類別數據成員不能是非 POD C++ 類型。 您只能在 CLR 類型中具現化 POD 原生類型。 例如,POD 類型不能包含複製建構函式或指派運算符。

範例

下列範例會產生 C3633。

// C3633.cpp
// compile with: /clr /c
#pragma warning( disable : 4368 )

class A1 {
public:
   A1() { II = 0; }
   int II;
};

ref class B {
public:
   A1 a1;   // C3633
   A1 * a2;   // OK
   B() : a2( new A1 ) {}
    ~B() { delete a2; }
};