Lets say I want within my program to execute a statement/function every couple of random times?
like executing some function between 3-5 seconds elpased within runtime of the program (with cycling too, not only once).
Im using borland turbo C++ in a graphics.h (bgi) project and need to put a BLOCK of rectangles every couple of seconds to block the moving "pacman" . Thats the last thing remained for me and I donno how to do it. I can make the Block appear and go away by the putimage(.........,COPY_PUT) and then putimage(.....,XOR_PUT).
What I do not know is how I can execute them randomly or constantly every couple of secs.
Thanks