Y
Yuan
hi,
I do not know if this worth a cent.
we know vector<bool> is bad and we should use deque<bool>. However,
this guy gives me some trouble, (pls correct me if I am wrong).
In vector, the mem is guaranteed to be a continous block. however, for
deque, NO!!
So when we try to get an array out of a vector, we just set the
pointer to be the &vec[0], done.
For deque. get the address of the first elemen does not guarantee the
following mem blocks belongs to the queue.
I do not know if this worth a cent.
we know vector<bool> is bad and we should use deque<bool>. However,
this guy gives me some trouble, (pls correct me if I am wrong).
In vector, the mem is guaranteed to be a continous block. however, for
deque, NO!!
So when we try to get an array out of a vector, we just set the
pointer to be the &vec[0], done.
For deque. get the address of the first elemen does not guarantee the
following mem blocks belongs to the queue.