First of all yes I read the function on this site. That was console app, this is win32/directx. Ok what I want to do is generate a random number and assign it to the X1 coordinate of a rectangle, you know to blits and image.
I have tried several things and none seem to work.
First off I have a Meteor Class.
and I am assinging the X1 values to the rectangle via the member function
EnemyMeteor.SetX1Coordinate(); where EnemyMeteor is a meteor object.
I have trie doing this
int RandomX1=rand()%745;
EnemyMeteor.SetX1Coordinate(RandomX1);
or
EnemyMeteor.SetX1Coordinate(rand()%745);
yes and I am included #include <stdlib.h> This is my first time really using this function......please help.