what am i missing here?
Code:
include <iostream>
#include "empinfo.h"
using namespace std;
void getempdata(struct empinfo emp1[], int &count1, int MAX)
{
char ans,ret;
count1 =0;
while (((ans=='Y')||(ans =='y'))&&(count1<MAX))
{
cout << "Input last name:";
cin.getline (emp1[count1].name,21);
cout << "Input first name:";
cin.getline (emp1[count1].name1,21);
cout << "input hours:";
cin >> emp1[count1].hours;
cout << "Input payrate:";
cin >> emp1[count1].payrate;
count1++;
cout << "Input another - Y or N:";
cin >> ans;
cin.get(ret);
}
return;
}