eliakim_online25 wrote:
> how about if i have a gamescreen and i want items in it to be placed
> in different locations within the gamescreen as i start the game.....

Use two random numbers - one to generate the x coordinate, the other the 
y coordinate.  You can limit each direction using the modulus operator %

#define MAX_X   80
#define MAX_Y   25

x = rand() % MAX_X;
y = rand() % MAX_Y;

...Or something like that for a beginner's approach...

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to