Click here to Skip to main content
16,006,355 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Assigning data to a specific instance of a form. Pin
MAW308-Feb-07 13:56
MAW308-Feb-07 13:56 
QuestionIs this normal or is there a bug?? Pin
zoleero7-Feb-07 11:24
zoleero7-Feb-07 11:24 
QuestionAccessing USB webcam from c++ Pin
MrVanx7-Feb-07 8:32
MrVanx7-Feb-07 8:32 
AnswerRe: Accessing USB webcam from c++ Pin
Mark Salsbery7-Feb-07 10:09
Mark Salsbery7-Feb-07 10:09 
AnswerRe: Accessing USB webcam from c++ Pin
Like2Byte9-Feb-07 2:44
Like2Byte9-Feb-07 2:44 
GeneralRe: Accessing USB webcam from c++ Pin
MrVanx11-Feb-07 7:44
MrVanx11-Feb-07 7:44 
Questioncpu usage per thread Pin
yoaz6-Feb-07 23:26
yoaz6-Feb-07 23:26 
QuestionMersenne twister Pin
zoleero6-Feb-07 14:53
zoleero6-Feb-07 14:53 
I have been looking on the net for random number generators and found something called "Mersenne Twister" on this page: http://en.wikipedia.org/wiki/Mersenne_twister. And there you find som pseudocode that I don't fully understand. For example, how do I write this line in C++?:

MT[ i ] := last_32bits_of((69069 * MT[i-1]) + 1)

And from the second function, how do I write the following code in C++?

y := 32nd_bit_of(MT[ i ]) + last_31bits_of(MT[i+1])

Is this the most efficient way of checking if a number is even?: if(x % 2 == 0){do something...;}

The most confusing parts here are "last_32bits_of", "32nd_bit_of" and "last_31bits_of". I don't really understand what that mean at all. I am totaly lost here!!

And finnaly when I have my three functions, how do I use them??? Say I want a random number between 13 and 12 456 123. How are these functions intended to be used??


I know there are a C# version and native C++ version of a class here on code project that uses this algorithm, but I wanted to develop something on my own. And first I need to understand this pseudocode so I can develop my own not so complex class. I have been looking in to the two versions mentioned above but I could not figure out how it really worked.

best regards, Andreas
AnswerRe: Mersenne twister Pin
User 5838526-Feb-07 15:52
User 5838526-Feb-07 15:52 
AnswerRe: Mersenne twister Pin
Mark Salsbery6-Feb-07 16:21
Mark Salsbery6-Feb-07 16:21 
Questionnew Operator in .dll Pin
W Balboos, GHB6-Feb-07 8:33
W Balboos, GHB6-Feb-07 8:33 
QuestionConfiguration File Pin
priyank_ldce6-Feb-07 3:06
priyank_ldce6-Feb-07 3:06 
AnswerRe: Configuration File Pin
prasad_som7-Feb-07 20:26
prasad_som7-Feb-07 20:26 
Question.pdb files in release build Pin
bankai1235-Feb-07 17:56
bankai1235-Feb-07 17:56 
AnswerRe: .pdb files in release build Pin
bsaksida5-Feb-07 20:44
bsaksida5-Feb-07 20:44 
AnswerRe: .pdb files in release build Pin
Bartosz Bien6-Feb-07 4:43
Bartosz Bien6-Feb-07 4:43 
GeneralRe: .pdb files in release build Pin
bankai1236-Feb-07 12:05
bankai1236-Feb-07 12:05 
QuestionOracleDataReader undeclared identifier error Pin
Reveille5-Feb-07 14:59
Reveille5-Feb-07 14:59 
AnswerRe: OracleDataReader undeclared identifier error Pin
User 5838525-Feb-07 15:41
User 5838525-Feb-07 15:41 
AnswerRe: OracleDataReader undeclared identifier error Pin
User 5838525-Feb-07 15:45
User 5838525-Feb-07 15:45 
GeneralRe: OracleDataReader undeclared identifier error Pin
Reveille7-Feb-07 9:03
Reveille7-Feb-07 9:03 
Question[Message Deleted] Pin
Petra5-Feb-07 11:55
Petra5-Feb-07 11:55 
AnswerRe: how to get a location of a character Pin
User 5838525-Feb-07 12:13
User 5838525-Feb-07 12:13 
GeneralRe: how to get a location of a character Pin
Mark Salsbery5-Feb-07 12:21
Mark Salsbery5-Feb-07 12:21 
AnswerRe: how to get a location of a character [modified] Pin
Mark Salsbery5-Feb-07 12:20
Mark Salsbery5-Feb-07 12:20 

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.