Slow down an array?

Hi, Is there any way I can loop through the elements of an array a bit slower? I am currently using an array to hold the filenames of images I want to load. When the user presses a key, the images animate by looping through the filenames in the array, and displaying the images.

If anyone know any methods, they would be appreciated. Thanks :slight_smile:

P.S. Any idea why my post got locked on the advanced coding section called “Class problem”. I thought it was pretty much related to opengl. nm though

why not using a timer … ?

its a common programming thing if you dont know this well . go to class again

well, the post started with “c++”, so you implied that it <might> not be an opengl problem. and you posted random snippets like “here’s the constructor” or “here’s the destructor” which doesn’t really help, because in c++ a constructor is called when an object is created, and a destructor is called when an object is deleted. for debugging c++ it is necessary to know the complete history of an object. is it a global or local variable?

if something does not work, save us some work and post the shortest compileable code that suffers from the problem that you described. something that i can copy+paste from here and try to compile.

yeh well, not everyone knows everything. I tried using the Sleep() function, but I have a feeling its not terribly efficient.
Thanks for clearing that up RB. I think it would be a good idea to have a rules section to avoid this sorta thing. Cheers

This may sound a bit harsh, but common sense should be enough to know how to ask questions.

But if you really need a “rules section”, check this out:

yes it is a bit harsh thanks