I wish that , but of course when I try to implement it it doesn´t work!!!
When I declare a queue in main like this, it works!
but in mine Person-class it doesn´t
using namespace std;
int aqueuesize = aqueue.size();
for (int i = 0; i < aqueuesize; i++)
cout << "Value nr " << i+1 << " " << aqueue.front() << endl;
When I print out some debug I´ve noticed some strange things, in the deconstructor of Person it pushes the right value every time but the size of the queue reamains at 1 all the time. I´ve deleted
//If queue is empty then do as usual
itsId = id++;
//Or if it isn´t
//retrieve 'lost id number' (front item)
itsId = idqueue.front();
//remove the front item
//When deleting a person push that id on a queue
like 10 Persons one after one but still it insist that only 1 element is in the queue.
And every time the constructor is invoked the queue seems to be empty.
What am I doing wrong???