I think the accepted answer does not answer the OP question.
If the compiler switch /clr on, then the int keyword means System::Int32 , it is not native.
If the compiler /clr switch is off, the int keyword means native C / C ++ int , it is not controlled.
Using System::Int32 implies a significant decrease in performance over native int (you can measure it).
You can disable the /clr compiler for the .cpp file. This is not a project option, it is a translation option (.cpp file).
Right-click the file, then properties, etc.
So you can write your own code in a .cpp file (compiled with /clr off).
Then you can write managed code in another file (compiled with /clr on) and call your own code.
source share