Skip to content

Instantly share code, notes, and snippets.

@victory-sokolov
Last active November 23, 2023 14:44
Show Gist options
  • Save victory-sokolov/060b9fe5f6eecc9f0f7c3250209095a3 to your computer and use it in GitHub Desktop.
Save victory-sokolov/060b9fe5f6eecc9f0f7c3250209095a3 to your computer and use it in GitHub Desktop.
using namespace System::Runtime::InteropServices;
char * and_SysStringToChar(System::String^ string)
{
return (char*)(void*)Marshal::StringToHGlobalAnsi(string);
}
String^ s = textBox1->Text;
char* str = and_SysStringToChar(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment