Objects with distinct values are written to a deque but when reading them all but the first have the same value
This code creates a client class with variables name
, arrival time
, and delay
. The loop creates new clients in a queue by reading their arrival time, adding a delay to it, and make it the arrival for the new client. When appending the client objects to the queue all are distinct, however when I try to read them they become the same for only the arrival time. Why does this happen?
Objects with distinct values are writen to a deque but when reading them all but the first have the same value
This code creates a client class with variables name, arrival time,
and delay. The loop creates new clients in a queue by reading their
arrival time, adding a delay to it and make it the arrival for the new
client. When appending the client objects to the queue all are
distinct, however when I try to read them they become the same for
only the arrival time. Why this happens?