From: Johan Råde (rade_at_[hidden])
Date: 2006-08-21 12:30:47


The problem may be that int and ptrdiff_t are distinct types on your
platform.

Try the following:

   ptrdiff_t customRand(ptrdiff_t n) { return (rand() % n); }

--Johan Råde