do
{
waitID.front()--;
cout<<"Sec left:"<<waitID.front()<<endl;
wait(1);
}
while(waitID.front()>1);
{
Q.pop();
waitID.pop();
cout <<" Job done "<<endl;
}
/*
while (waitID.front() == 7)
{
temp1 = Q.front(); // store into temp storage
temp2 = waitID.front();
Q.push(temp1);// push temp element to the queue
waitID.front()--;
waitID.push(temp2);
cout << "requeue" << temp1<<endl;
}
*/
}
if (waittime >= 7)
{
//Counter waitID.front();
//Counter();
temp1 = Q.front(); // store into temp storage
temp2 = waitID.front();
Q.push(temp1);// push temp element to the queue
waitID.front()--;
waitID.push(temp2);
That's an constructor with an initializer list. However it seems odd in that it is assigning waittime (an uninitialized variable) to count, ignoring the passed value of i.