Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ->Operator overloading in C++ Pin
Maximilien14-Apr-05 3:12
Maximilien14-Apr-05 3:12 
GeneralRe: ->Operator overloading in C++ Pin
Cedric Moonen14-Apr-05 3:23
Cedric Moonen14-Apr-05 3:23 
QuestionHow to start NT services in VC++ Pin
aloktambi14-Apr-05 2:24
aloktambi14-Apr-05 2:24 
AnswerRe: How to start NT services in VC++ Pin
ThatsAlok14-Apr-05 2:46
ThatsAlok14-Apr-05 2:46 
Questionhow to make random number generate fuction in vc++ Pin
aloktambi14-Apr-05 2:23
aloktambi14-Apr-05 2:23 
AnswerRe: how to make random number generate fuction in vc++ Pin
David Crow14-Apr-05 2:31
David Crow14-Apr-05 2:31 
AnswerRe: how to make random number generate fuction in vc++ Pin
ddmcr14-Apr-05 4:47
ddmcr14-Apr-05 4:47 
AnswerRe: how to make random number generate fuction in vc++ Pin
El Corazon14-Apr-05 5:18
El Corazon14-Apr-05 5:18 
if you don't care the numerical distribution within the function, use the rand()%101 as others have recommended. Pay attention to inclusive verses exclusive. rand()%101 will give you results 0..100 inclusive. rand()%99+1 will give you 1-99 range (or 0..100 exclusive).

There are no "perfect" random number generators, there is only the best for your needs. For 99.9% of random number needs, a rand()%n distribution for 0..(n-1) range is sufficient. If you have need of better attempts at uniform and non-uniform distribution random generators, you can google on the subject, or visit the boost library set.

http://www.boost.org/libs/random/index.html[^]

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
GeneralFailed to register service during VC build Pin
pettink14-Apr-05 2:12
pettink14-Apr-05 2:12 
GeneralRe: Failed to register service during VC build Pin
Blake Miller14-Apr-05 4:28
Blake Miller14-Apr-05 4:28 
Generalconvert hex value to string Pin
Jangid14-Apr-05 1:54
Jangid14-Apr-05 1:54 
GeneralRe: convert hex value to string Pin
Bob Stanneveld14-Apr-05 3:34
Bob Stanneveld14-Apr-05 3:34 
GeneralRe: convert hex value to string Pin
CP Visitor14-Apr-05 4:28
CP Visitor14-Apr-05 4:28 
GeneralRe: convert hex value to string Pin
Blake Miller14-Apr-05 4:31
Blake Miller14-Apr-05 4:31 
GeneralRe: convert hex value to string Pin
itkid15-Apr-05 0:26
itkid15-Apr-05 0:26 
Generallinker error Pin
MilanZ14-Apr-05 0:53
MilanZ14-Apr-05 0:53 
GeneralRe: linker error Pin
David Crow14-Apr-05 2:29
David Crow14-Apr-05 2:29 
GeneralFade in out of WAV file Pin
jase_dukerider14-Apr-05 0:52
jase_dukerider14-Apr-05 0:52 
Generalcode verfication tool for c++ Pin
Member 188188814-Apr-05 0:33
Member 188188814-Apr-05 0:33 
GeneralRe: code verfication tool for c++ Pin
ThatsAlok14-Apr-05 1:31
ThatsAlok14-Apr-05 1:31 
GeneralRe: code verfication tool for c++ Pin
Anonymous14-Apr-05 2:05
Anonymous14-Apr-05 2:05 
GeneralRe: code verfication tool for c++ Pin
ThatsAlok14-Apr-05 2:43
ThatsAlok14-Apr-05 2:43 
GeneralRe: code verfication tool for c++ Pin
Anonymous14-Apr-05 2:36
Anonymous14-Apr-05 2:36 
GeneralRe: code verfication tool for c++ Pin
ThatsAlok20-Apr-05 19:52
ThatsAlok20-Apr-05 19:52 
GeneralInteraction between Web and Windows application Pin
nidhishri13-Apr-05 23:30
nidhishri13-Apr-05 23:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.