just wondering how I would go about adding ints to an array in the following way;
I am getting average framerate for my game, but from what I understand if I create an int array of [10], I have no native way of just adding a number to the start of the array.
I want to do this.
myInt[0] = 60
myInt[1] = 59
myInt[2] = 61
I want to add, say, 30, to myInt[0], and have it move the current myInt[0] to [1] and [1] to [2], so it just moves everything along one and drops the last integer from the array.
What I've tried to do so far just changes [0], making my average calculations useless. Also, I'm using SDL_GetTicks() to snag the current elapsed time.
Is there a better way to do average framerate?