rand function
what header is the random function included in?
for some reason it isnt working.
This is how im using it.
SetTextColor(hdc, RGB(rand()%256, rand()%256, rand()%256));
Usually you want to use srand() with the time as the seed, to make what rand() spits out actually pseudo-random and not deterministic.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement