Finding position of Array

I pretty much want clckNAM[HERE] to be the location of the found employee ID in the array empID.



while(mainMENU!=3)
{ if(mainMENU==1)
{ std::cout << "\nWelcome to the Clock-In menu, please enter your employee ID, or enter '0' to exit to menu.\n" << endl;
std::cin >> clockIn;

while (clockIn!=0)
{
for(i=0; i<2; i++)
{
if(empID[i]==clockIn)
{
flag=1;
i=ii;
break;
}
}
if(flag==1)
{
time (&start);
std::cout << clkNAM[HERE] << endl;
std::cout << "Clock-in accepted.\n" << endl;
break;
1
2
3
4
5
6
std::cin >> ID; //Enter ID to search
int found(0);
for( ; found < arrSize; ++found) //Searching
    if (empID[found] == ID)
        break;
//found now contains index od ID in empID or arrSize if not found 
thanks buddy
Topic archived. No new replies allowed.