you encapsulated the declaration of employeenum in the scope of the do - while statement, this means that employeenum is not defined outside of the paranthesis { ... }. But while (employeenum == 0) is not within this block of course, so employeenum is unknown.
To solve this problem you just need to move the declaration of employeenum in front of the do-while statement.