Probably undefined behaviour of some kind. As you're using fixed size arrays for strings check that you're not overflowing them, for example, this might:
		cout << "Employee Name: ";
	cin.getline(, 31);
as is defined as char[20], which gives you 19 characters for the name plus a terminating NULL.

For any more detail you'd also have to post payroll.txt (NOT all of it - just enough to reproduce the problem) and whatever input you're giving the program. Also the output you get could be useful as it might point directly to the problem.