I get this error with this code:
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);
The error occurs with: rename(oldhtml, newhtml);
I am fairly new to C++. So if this is a simple fix I apologise