overTimeFile.close();
overTimeTemp.close();
overTimeTemp.open("overTimeTemp.txt");
temp.open("temp.txt");
while (getline(overTimeTemp, name))//while getting names from overTimeTemp
{
temp << name << std::endl;//store names from overTimeTemp.txt into temp.txt file
}
remove("overTimeTemp.txt"); //deletes overTimeTemp file
remove("employeeRoster.txt"); //deletes the old file employeeRoster.txt
rename("temp.txt", "employeeRoster.txt"); //renames the temp file to employeeRoster.txt ***an error is occuring here?***
temp.close();
if (rename("temp.txt", "employeeRoster.txt") == -1)
{
std::string stop;
std::cout << "Error: " << strerror(errno) << std::endl;
getline(std::cin, stop);
}