My line of thought is to use Left shift of bits. Maybe call the function twice.
What would be the most efficient way?
This is a discussion on How to generate random numbers between 0 to 7 using a function that generates 0 to 3 within the C++ Programming forums, part of the General Programming Boards category; My line of thought is to use Left shift of bits. Maybe call the function twice. What would be the ...
My line of thought is to use Left shift of bits. Maybe call the function twice.
What would be the most efficient way?
I think you're headed in a right direction.Originally Posted by Ben Frankliner
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Maybe throw in an xor there too...
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"