Compiler Error C3181
'type' : invalid operand for operator
An invalid parameter was passed to the typeid operator. The parameter must be a managed type.
Note that the compiler uses aliases for native types that map to types in the common language runtime.
The following sample generates C3181:
// C3181a.cpp
// compile with: /clr
using namespace System;
int main() {
Type ^pType1 = interior_ptr<int>::typeid; // C3181
Type ^pType2 = int::typeid; // OK
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for