You can use mersenne twister while still using standard srand and rand functions without any code change.