How to convert char * to a System::string ^
16,886
You can do:
String^ sCertificate;
sCertificate = gcnew String(pcertificate);
Author by
Admin
Updated on July 24, 2022Comments
-
Admin almost 2 years
Possible Duplicate:
What is the best way to convert between char* and System::String in C++/CLIHello, I have a function in a c++ project using \clr something like:
int WINAPI dmtTest(char *pcertificate) { String^ sCertificate; sCertificate = pcertificate; // how can I assign pcertificate to sCertificate? .... }
-
Scott Solmer about 8 yearsThis works... trying to find the opposite direction (String to Char*)...