• Advertisement
Sign in to follow this  

[STL] Is there a Circular Array Data Structure in STL?

This topic is 2937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Original post by hiigara
I need to store the last n States of my Simulation.

If all else fails, you can just do something like:

std::deque<state> prevStates;

void addState(const state &s)
if (prevStates.size() > MAX_NUM_STATES)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement