我有以下代碼,我無法弄清楚如何將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