Random positions , and Mouse event

Hello every one ,

I’m begginer in OpenGL ,
rand() function
Whats the number should be after the % …
should any one give me a small discription of it ,
it’s syntax , and should i use a single one for all objects or one for all ??

the mouse event whe i want to move the object to the mouse clicking position i know i should translete the mouse coordinate to the monitor coordinate how this will be done ?

thank u :slight_smile:

About rand() function: http://www.cplusplus.com/reference/clibrary/cstdlib/rand/

Thanks McLeary that was helpful , but if I want to use it to generate random coordinate for an object which numbers i should range it in to keep it in the screen boundries

thanks