System::String ^toSys(string x) {
System::String ^output = "";
for (int i = 0; i < x.size(); i++) {
output += x[i];
}
return output;
}
string toStd(System::String ^x) {
string output = "";
for (int i = 0; i < msclr::interop::marshal_as<string>(x).length(); i++)
output += x[i];
}
return output;
}
There are no errors for conversion either way, but when converting to a system string it takes the value of each char (e.g "48" for '0'). How can I make it use the actual characters?