I'm trying to use the following code to convert a native string to a managed string in C++\CLI:
System::String^ NativeToDotNet( const std::string& input )
{
return System::Runtime::InteropServices::Marshal::PtrToStringAnsi( (static_cast<LPVOID>)( input.c_str() ) );
}
I originally found the code here:
But when I try to build it throws the error:
syntax error : identifier 'LPVOID'
Any idea how to fix this?