Hi everyone!
I have a program that requires me to track the time between the last object created to know when to create another one.
The program is about a game that moves a dropper or square around the window. This square on a certain random time must drop a colored square (called box from another class) that will fall down. Then I need to count the time to check when to drop the next one, and so on
The thing is that I don't know how to count the seconds in a program!!
If someone can help me I will really appreciate it.
This is what I tried.
dropper::dropper()
{
int currentXp= getx();
int currentYp= gety();
srand( static_cast<int>( time( NULL ) ) );
currentYp=rand()%SCREEN_H;
currentXp=rand()%SCREEN_W;