我有以下代码,我无法弄清楚如何将char字符串转换为std字符串。有人能帮助我吗?如何将char字符串转换为std字符串
char Path[STRING_MAX];
test->getValue(Config::CODE,Path);
size_t found;
cout << "Splitting: " << Path << endl;
found=Path.find_last_of("/");
cout << " folder: " << Path.substr(0,found) << endl;
cout << " file: " << Path.substr(found+1) << endl;
请缩进代码4个空格让它正确显示。 – Swiss 2011-04-05 18:23:13