I'm working on a vc++ CLR window 开发者_JAVA技巧application.In this application when I browse the local file system for file selection, the input file path is coming in string^ type ...now I want to change this ^ type to char* type. Help me. Thank you.
You probably want Marshal::StringToHGlobalAnsi
IntPtr p = Marshal::StringToHGlobalAnsi(managedString);
char* c = (char*)p.ToPointer();
...
Marshal::FreeHGlobal(p);
See msdn for more.
精彩评论