分享方式:


編譯器錯誤 C3699

'operator' : 無法在類型 'type' 上使用這個間接值

嘗試使用 不允許的 type 間接值。

範例

下列範例會產生 C3699。

// C3699.cpp
// compile with: /clr /c
using namespace System;
int main() {
   String * s;   // C3699
   // try the following line instead
   // String ^ s2;
}

Trivial 屬性不能有參考類型。 如需詳細資訊,請參閱 property 。 下列範例會產生 C3699。

// C3699_b.cpp
// compile with: /clr /c
ref struct C {
   property System::String % x;   // C3699
   property System::String ^ y;   // OK
};

對等的「指標指標」語法是追蹤參考的控制碼。 下列範例會產生 C3699。

// C3699_c.cpp
// compile with: /clr /c
using namespace System;
void Test(String ^^ i);   // C3699
void Test2(String ^% i);