Click here to Skip to main content
15,915,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Arrays Pin
CPallini24-Mar-09 1:34
mveCPallini24-Mar-09 1:34 
JokeRe: Arrays Pin
Eytukan24-Mar-09 1:36
Eytukan24-Mar-09 1:36 
JokeRe: Arrays Pin
CPallini24-Mar-09 1:33
mveCPallini24-Mar-09 1:33 
GeneralRe: Arrays Pin
Eytukan24-Mar-09 1:35
Eytukan24-Mar-09 1:35 
GeneralRe: Arrays Pin
Neal beavis24-Mar-09 1:39
Neal beavis24-Mar-09 1:39 
GeneralRe: Arrays Pin
Eytukan24-Mar-09 1:43
Eytukan24-Mar-09 1:43 
QuestionRe: Arrays Pin
David Crow24-Mar-09 2:41
David Crow24-Mar-09 2:41 
GeneralRe: Arrays Pin
CPallini24-Mar-09 1:43
mveCPallini24-Mar-09 1:43 
Anyway there's a flaw, it should be:
int i = 10 + rand() % (21 - 10);


to generate a number ranging from 10 to 20 (including bounds).
In the above example you may also be correct (because you didn't mentionate of including both of the bounds), but in your original post, (19-0) is wrong, because rand() % (19-0) ranges from 0 to 18 (bounds included).
-- Carlo the Nitpick.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Arrays Pin
Eytukan24-Mar-09 1:53
Eytukan24-Mar-09 1:53 
GeneralRe: Arrays Pin
CPallini24-Mar-09 3:22
mveCPallini24-Mar-09 3:22 
QuestionODBC database problem Pin
Deepu Antony24-Mar-09 0:55
Deepu Antony24-Mar-09 0:55 
QuestionRe: ODBC database problem Pin
David Crow24-Mar-09 2:48
David Crow24-Mar-09 2:48 
AnswerRe: ODBC database problem Pin
Deepu Antony24-Mar-09 3:23
Deepu Antony24-Mar-09 3:23 
Questionerror LNK2001: unresolved external symbol Pin
ytubis24-Mar-09 0:26
ytubis24-Mar-09 0:26 
AnswerRe: error LNK2001: unresolved external symbol Pin
Cedric Moonen24-Mar-09 0:35
Cedric Moonen24-Mar-09 0:35 
AnswerRe: error LNK2001: unresolved external symbol [modified] Pin
S p k 52124-Mar-09 0:37
S p k 52124-Mar-09 0:37 
AnswerRe: error LNK2001: unresolved external symbol Pin
Eytukan24-Mar-09 0:40
Eytukan24-Mar-09 0:40 
Questionstring append with \ symbol Pin
Thilek23-Mar-09 23:23
Thilek23-Mar-09 23:23 
AnswerRe: string append with \ symbol Pin
Eytukan23-Mar-09 23:33
Eytukan23-Mar-09 23:33 
GeneralRe: string append with \ symbol Pin
Thilek23-Mar-09 23:40
Thilek23-Mar-09 23:40 
QuestionRe: string append with \ symbol Pin
Maxwell Chen23-Mar-09 23:51
Maxwell Chen23-Mar-09 23:51 
AnswerRe: string append with \ symbol Pin
Thilek23-Mar-09 23:58
Thilek23-Mar-09 23:58 
GeneralRe: string append with \ symbol Pin
David Crow24-Mar-09 2:51
David Crow24-Mar-09 2:51 
AnswerRe: string append with \ symbol Pin
KarstenK24-Mar-09 0:03
mveKarstenK24-Mar-09 0:03 
GeneralRe: string append with \ symbol Pin
Thilek24-Mar-09 0:34
Thilek24-Mar-09 0:34 

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.