Follow Us
Contribute
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.

Categories

0 votes

The compiler detected an operator definition using the Managed Extensions for C++ syntax. Ex:


// compile with: /clr /LD
#using <mscorlib.dll>
value struct V {
   static V op_Addition(V v, int i);   // C3195
};

requested by (170k points)

2 Solutions

0 votes

This article is a derivative work based on http://msdn.microsoft.com/en-us/library/w6368wy7.aspx" title="http://msdn.microsoft.com/en-us/library/w6368wy7.aspx" target="_blank">Compiler Error C3195 which is provided by http://msdn.microsoft.com/en-us/library/60k1461a.aspx" title="http://msdn.microsoft.com/en-us/library/60k1461a.aspx" target="_blank">MSDN Community Content - Visual C++.

solved by (170k points)
0 votes

Either use the new C++ syntax or use the /clr:oldSyntax compiler option to enable the Managed Extensions for C++ syntax.


// compile with: /clr /LD
#using <mscorlib.dll>
value struct V {
   static V operator +(V v, char c);  
};

solved by (170k points)
...