How to convert char * to string System :: string ^

Possible duplicate:
What is the best way to convert between char * and System :: String in C ++ / CLI .

Hello, 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? .... } 
+7
string c ++ - cli
source share
1 answer

You can do:

 String^ sCertificate; sCertificate = gcnew String(pcertificate); 
+14
source share

All Articles