, figuerres wrote

well .net provides a *lot* of good stuff that you lose if you go fully native.



didn't managed C++ show that a language could mix native and managed code?  I thought the only problem with managed C++ was that the programmer had to use the  ^ syntax. And there is work involved in copying between managed and unmanaged variables. I was hoping the compiler would do more for me.

here is the code to convert from a managed string to a native std::wstring:

wstring to_wstring( String^ Text )
 wstring text ;
  if ( Text != nullptr )
    wchar_t* pText = (wchar_t*) Marshal::StringToHGlobalUni(Text).ToPointer( ) ;
    text = pText ;
    Marshal::FreeHGlobal( IntPtr(pText)) ;
 return text ;