Scratch that... update coming...
You say:
string FirstName[4], LastName[4];
double pay[4], hours[4], TotalSalary = 0;
And also (before your change...)
There's your problem... alluded to earlier.
while(counter != 5) (or < 5 if you've changed it)... the subscripts are mixed up.
When you DECLARE an array, you use 1's index... ie:
string FirstName[4] means declare an array of 4 string type variables.
When you USE an array, you use 0's index... ie:
FristName[0] is element #1
FirstName[1] is element #2
FirstName[2] is element #3
FirstName[3] is element #4
where index (n - 1) is element (n).
Your conditional, you're testing against the index, which means you need to think in terms in (n - 1) rather than (n). Hence, if counter < 5 or whatnot, that means your loop will execute when counter == 4. But because an index of 4 is out of bounds for your arrays (yes, your arrays are of length 4, but the highest index is length - 1, which means 3), the final iteration of the loop will try to access an invalid element of the array.
eg: FirstName[4] is element #5... there is no element number 5!!!
Solution, test if counter < length of array - 1, or initialize counter to 1 and offset all of your indexes to [counter - 1]. Again, two different ways of doing the same thing, it's all your preference.
As a side note: Access Violation usually means you're trying to access a memory location that wasn't intended, such as this - a memory location out of the bounds of a given array. The other main reason for this error is that you're attempting to access memory that is not initialized/allocated - perhaps memory that has been freed or a pointer that hasn't been initialized.