Kompilatorfel C3834

illegal explicit typomvandling till en fästpekare; använd en fäst lokal variabel i stället

Anmärkningar

Explicita omvandlingar till en låst pekare tillåts inte.

Example

I följande exempel genereras C3834.

// C3834.cpp
// compile with: /clr
int main() {
   int x = 33;

   pin_ptr<int> p = safe_cast<pin_ptr<int> >(&x);   // C3834
   pin_ptr<int> p2 = &x;   // OK
}