switch(userResponse)
{
case 1: cout<< "Now, would not be a great time to admire the view! You're being attack by zombies!"<<endl;
srand(time(0));
int numpicked= rand()% 15 + 1;
healthlocation= healthlocation - numPicked;
cout<< "A zombie attacks you whil you gaze around! Your health is now "<<healthlocation<<"%. Try to pick a better option next time."<<endl;
}
}
}
My srand in the code above will not generate random numbers! The "random number" will always end up as 100. Can anyone explain why this is happening!! It's not generating random numbers!