0

Hi, I have written a Solitaire game program and have made a history of moves so the user may either go back on moves and make another choice or go forward after having gone back. Now I am using a vector to store the moves.

When the user has made several moves, decides to use the history to go back several moves and then plays a new move, the vector uses the pop_back() method to get rid of the moves on which the user has gone back. The process of poping back several moves is quite slow. Is this a drawback of the vector?

May thanks

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Jim Larkin
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.