Click here to Skip to main content
16,011,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Closing Document assertion? Pin
Serge Krynine6-Mar-02 20:03
Serge Krynine6-Mar-02 20:03 
GeneralRe: Closing Document assertion? Pin
Richard Everingham6-Mar-02 20:25
Richard Everingham6-Mar-02 20:25 
AnswerRe: Closing Document assertion? Pin
Roger Allen7-Mar-02 5:04
Roger Allen7-Mar-02 5:04 
QuestionHow to open recordset using command object Pin
6-Mar-02 18:12
suss6-Mar-02 18:12 
AnswerRe: How to open recordset using command object Pin
Mazdak6-Mar-02 19:26
Mazdak6-Mar-02 19:26 
General(read) rand() function. Pin
SilverShalkin6-Mar-02 16:05
SilverShalkin6-Mar-02 16:05 
GeneralRe: (read) rand() function. Pin
Serge Krynine6-Mar-02 16:36
Serge Krynine6-Mar-02 16:36 
GeneralRe: (read) rand() function. Pin
SilverShalkin6-Mar-02 17:05
SilverShalkin6-Mar-02 17:05 
lets see,... could you do...

Serge Krynine wrote:
#include "stdafx.h" "could this be stdlib.h?"
#include
#include

void main()
{
srand(0);
while (1) "what does this do?"
{
int rnd = rand() % 10 + 1; "Do you have to do 10 + 1, or can you do 11?"
if (rnd < 1 || rnd > 10)
{
printf("Out of range [1-10], rnd = %d\n", rnd);
return;
}
else
{
printf("generated rnd = %d\n", rnd);
Sleep(500);
}
}
}


I got most of that, thanks, Ill try it out and see what happends.

~SilverShalkin
GeneralRe: (read) rand() function. Pin
Nish Nishant6-Mar-02 17:22
sitebuilderNish Nishant6-Mar-02 17:22 
GeneralRe: (read) rand() function. Pin
Serge Krynine6-Mar-02 17:25
Serge Krynine6-Mar-02 17:25 
GeneralRe: (read) rand() function. Pin
Christian Graus6-Mar-02 21:33
protectorChristian Graus6-Mar-02 21:33 
GeneralRe: (read) rand() function. Pin
SilverShalkin7-Mar-02 3:01
SilverShalkin7-Mar-02 3:01 
GeneralRe: (read) rand() function. Pin
Christian Graus7-Mar-02 9:29
protectorChristian Graus7-Mar-02 9:29 
Generala question about using tree control in atl Pin
realfly6-Mar-02 14:24
realfly6-Mar-02 14:24 
GeneralRe: a question about using tree control in atl Pin
Paul M Watt6-Mar-02 18:53
mentorPaul M Watt6-Mar-02 18:53 
GeneralRe: a question about using tree control in atl Pin
realfly6-Mar-02 19:21
realfly6-Mar-02 19:21 
GeneralAutoComplete Members from Dll Pin
MarkPQ6-Mar-02 13:09
MarkPQ6-Mar-02 13:09 
GeneralRe: AutoComplete Members from Dll Pin
Michael P Butler7-Mar-02 0:33
Michael P Butler7-Mar-02 0:33 
GeneralSleep() Pin
6-Mar-02 12:42
suss6-Mar-02 12:42 
GeneralRe: Sleep() Pin
Serge Krynine6-Mar-02 12:49
Serge Krynine6-Mar-02 12:49 
GeneralRe: Sleep() Pin
6-Mar-02 13:36
suss6-Mar-02 13:36 
GeneralRe: Sleep() Pin
Christian Graus6-Mar-02 14:42
protectorChristian Graus6-Mar-02 14:42 
GeneralRe: Sleep() Pin
SilverShalkin6-Mar-02 13:14
SilverShalkin6-Mar-02 13:14 
GeneralRe: Sleep() Pin
Christopher Duncan6-Mar-02 16:48
Christopher Duncan6-Mar-02 16:48 
GeneralHTML parsing Pin
sofam6-Mar-02 11:41
sofam6-Mar-02 11:41 

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.