是否可以将 a 转换为 aboost::interprocess::string或std::stringa const char*?像c_str()...
例如:
boost::interprocess::string is = "Hello world";
const char* ps = is.c_str(); // something similar
printf("%s", ps);
我什至可以在非共享内存块中获取字符串的副本。
例如:
boost::interprocess::string is = "Hello world";
const char cs[100];
strcpy(cs, is.c_str()); // something similar
printf("%s", cs);
谢谢!