A
Andrea Crotti
I would need something in theory quite simple, a vector of a certain
size, which, when I add something and it's full, simply deletes the last
entry.
If for example I have
MyContainer x(3);
x.push(1);
x.push(2);
x.push(3);
x.push(4);
it should contain now
<4, 3, 2>
I don't see any of the STL structures doing exactly what I would like,
any suggestions on how to implement it?
size, which, when I add something and it's full, simply deletes the last
entry.
If for example I have
MyContainer x(3);
x.push(1);
x.push(2);
x.push(3);
x.push(4);
it should contain now
<4, 3, 2>
I don't see any of the STL structures doing exactly what I would like,
any suggestions on how to implement it?