Ameerh24
asked on
how to convert from managed string to char* in c++\clr ?
how to convert from managed string to char* in c++\clr ?
here is my try below:
but it returns an error:
error C2682: cannot use 'safe_cast' to convert from ' System::String ^ ' to ' char * '
here is my try below:
but it returns an error:
error C2682: cannot use 'safe_cast' to convert from ' System::String ^ ' to ' char * '
System::String^ s = "test";
cascade_name = safe_cast<char*,System::String^>(s);
\\ Important note: cascade_name variable is a global variable which has type of char*
\\ from header file: char* cascade_name;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER