how i see, you try del file by using command "del". more often I use command system:
#include <windows.h>
#include <iostream>
int main() {
std::cout << "use command \"del\"";
system("del /f C:\\Users\\samee\\AppData\\Local\\Temp\\tempFile.txt");
}
here you use cmd windows