It’s hard to say, but have you tried that:
rename("tmp.png", Filename.c_str());
If Filename
is a std::string
std::string::c_str()
converts it to a const char*
, which is maybe what needs your rename
function as second argument?
If you are trying to use standard rename function, this may solve your problem.