Could someone please help me with the following code. I've tried everything but I can't seem to get it to work.
The user is asked to enter the name (string), enter their id# string, then evaluate the id. the user is then asked to enter the hours, and finally the user is asked are there more employees. When I get to this point the function loops.
#include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
int n = 0;
float hrs[100],gross[100];//,bonus[100];
string EmployeeName[100],Eid[100] ;
// string Id;
bool valid = true;
do
{
EmployeeName[n]=GetEmployeeName();
do
{
cout<<"Enter the employee ID#: ";
getline(cin,Eid[n]);
valid = validid(Eid[n]);
if (!valid)
cout<<"********** INVALID EMPLOYEE ID ********** \nPlease Re-";
} while (!valid);