Compiler Error C3699

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3699.

operator' : cannot use this indirection on type 'type'

An attempt was made to use indirection that is not allowed on type.

The following sample generates C3699.

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

A trivial property cannot have reference type. See property for more information. The following sample generates C3699.

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

The equivalent of a "pointer to a pointer" syntax is a handle to a tracking reference. The following sample generates C3699.

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

Show: