making sleep randomised?

so I'm wanting to make an autoclicker, how would I make it so the sleep function is randomised from any number, to another
from example, every click it will sleep for (200 - 300) for example
1
2
3
4
5
6
7
8
9
#include <random>

std::random_device rd;     // only used once to initialise (seed) engine
std::mt19937 rng(rd());    // random-number engine used (Mersenne-Twister in this case)
std::uniform_int_distribution<int> uni(200,300); 


// Then, each time you want to sleep
sleep(uni(rng);)
 
			Sleep(uni(rng);)


I am returned with the following error(s):

error C2059: syntax error: ')'
error C2059: syntax error: ';'
You may use from the standard library sleep_for:

http://www.cplusplus.com/reference/thread/this_thread/sleep_for/

sleep(uni(rng););
Topic archived. No new replies allowed.