【发布时间】:2015-07-09 12:32:37
【问题描述】:
我收到此代码的错误:
string folder;
getline(cin, folder);
string folder2 = folder + "/index.txt";
const char* oldhtml[] = { folder2.c_str() };
folder2 = folder + "/index.html";
const char* newhtml[] = { folder2.c_str()};
rename(oldhtml, newhtml);
错误发生在:rename(oldhtml, newhtml);
我对 C++ 还很陌生。因此,如果这是一个简单的解决方法,我深表歉意
【问题讨论】:
-
能否提供
rename()的声明? -
@WorldSEnder:大概是en.cppreference.com/w/cpp/io/c/rename
-
@FredLarson 是对的。这就是我正在做的事情。抱歉非常迟回复
标签: c++