I have a C++ program running on Windows XP compiled with Visual C++ 6.0 containing the following code
and this fails, offering to send a message to Microsoft about the error of my ways.Code:if (remove(NewName) != 0) { errmsg = strerror(errno); printf("Removal Error: %s\n", errmsg); } if (rename(FileName,NewName) != 0) { errmsg = strerror(errno); printf("Rename Error: %s\n", errmsg); }
The file I want to rename(FileName) does exist and the file I want to rename it to(NewName) does not and none of my error messages appear.
Please make suggestions on how I should fix this.




Reply With Quote