Search:

Type: Posts; User: Verbenaca

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    8,189

    another problem

    Hi. I'd like to get rid of a problem with this code (same as before):


    while (1) {

    WaitResult = WaitForSingleObject(hStdin, 5000);

    if (WaitResult == WAIT_OBJECT_0)
    {
    ...
  2. Replies
    5
    Views
    2,561

    random number with probabilities

    Hi, just a follow up question to this thread. So how would you write the code if you have 3 numbers, for example, 60% probability of generating 0, 35% generating 1 and 5% generating 2. Thanks a lot:)
  3. Replies
    4
    Views
    3,004

    random number generator

    Hi. I was wondering if I can make the pseudo-random rand() function more random?
    I'm generating a random number between 0 and 2 for 30 times:

    for(int i=1; i<=30; i++)
    notification_rand =...
  4. Replies
    1
    Views
    1,249

    help with ReadConsoleInput please

    Hi. Can someone see what is wrong with this section of code?


    while(1)
    {
    ReadConsoleInput(hStdin,irInBuf,128, &cNumRead);

    if (irInBuf[cNumRead-1].Event.MouseEvent.dwButtonState ==...
  5. Replies
    6
    Views
    8,189

    Thank you for the reply! (the program works...

    Thank you for the reply! (the program works now:)) And sorry about posting it on the wrong board!
  6. Replies
    6
    Views
    8,189

    help with ReadConsoleInput()

    Hi. I'm writing a console program that uses ReadConsoleInput() to receive input from a mouseclick. My problem is that the program gets "stuck" at ReadConsoleInput() when there are no "events". I need...
Results 1 to 6 of 6