Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I get the MAC address Pin
sunit56-Dec-05 20:21
sunit56-Dec-05 20:21 
QuestionMS Visual C++ Exercises Pin
romuzu5-Dec-05 14:40
romuzu5-Dec-05 14:40 
JokeRe: MS Visual C++ Exercises Pin
Sathiyaraj Ganesan5-Dec-05 16:41
Sathiyaraj Ganesan5-Dec-05 16:41 
GeneralRe: MS Visual C++ Exercises Pin
vikas amin5-Dec-05 19:54
vikas amin5-Dec-05 19:54 
QuestionRandom function Pin
kwiggs5-Dec-05 13:16
kwiggs5-Dec-05 13:16 
AnswerRe: Random function Pin
Chris Losinger5-Dec-05 13:57
professionalChris Losinger5-Dec-05 13:57 
AnswerRe: Random function Pin
hint_545-Dec-05 14:45
hint_545-Dec-05 14:45 
AnswerRe: Random function Pin
cmk5-Dec-05 20:18
cmk5-Dec-05 20:18 
41 (you thought i'd say 42, so 41 is random).

... want another - 53.

Feel free to ask me whenever you want another one.
... or you can do what the other Chris said - use srand()/rand().

Or, you can do what most encryption engines do:
- accumulate a blob of random input data:
- current time
- current mouse position
- pixel color at mouse position
- process id, thread id
- mac address
- ...
- create a hash of the blob e.g. using SHA

SHA1 is 20 bytes long so you could use the resulting hash to get 20 random numbers by taking hash[i] % 100, where 0 < i < 20.


...cmk

Save the whales - collect the whole set
QuestionHow do I put a Check box column into a data grid Pin
wdaliu5-Dec-05 13:14
wdaliu5-Dec-05 13:14 
QuestionError with templates Pin
ssn0015-Dec-05 13:00
ssn0015-Dec-05 13:00 
QuestionGet selected text from IE and Word Pin
Franc Morales5-Dec-05 11:45
Franc Morales5-Dec-05 11:45 
AnswerRe: Get selected text from IE and Word Pin
Sheng Jiang 蒋晟5-Dec-05 18:32
Sheng Jiang 蒋晟5-Dec-05 18:32 
GeneralRe: Get selected text from IE and Word Pin
Franc Morales5-Dec-05 19:00
Franc Morales5-Dec-05 19:00 
QuestionCtrl + Tab =&gt; next Page Pin
WernerP5-Dec-05 10:15
WernerP5-Dec-05 10:15 
QuestionProperty Page Tab titles Pin
code dope5-Dec-05 9:22
code dope5-Dec-05 9:22 
QuestionRe: Property Page Tab titles Pin
David Crow5-Dec-05 9:47
David Crow5-Dec-05 9:47 
AnswerRe: Property Page Tab titles Pin
PJ Arends5-Dec-05 14:54
professionalPJ Arends5-Dec-05 14:54 
Questionerror C2228: left of '.ShowWindow' must have class/struct/union type Pin
newbie53455-Dec-05 9:14
newbie53455-Dec-05 9:14 
AnswerRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
Maximilien5-Dec-05 9:39
Maximilien5-Dec-05 9:39 
GeneralRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
newbie53455-Dec-05 10:01
newbie53455-Dec-05 10:01 
GeneralRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
Maximilien5-Dec-05 10:19
Maximilien5-Dec-05 10:19 
GeneralRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
newbie53455-Dec-05 11:03
newbie53455-Dec-05 11:03 
GeneralRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
toxcct5-Dec-05 22:38
toxcct5-Dec-05 22:38 
QuestionRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
David Crow5-Dec-05 9:40
David Crow5-Dec-05 9:40 
AnswerRe: error C2228: left of '.ShowWindow' must have class/struct/union type Pin
newbie53455-Dec-05 10:02
newbie53455-Dec-05 10:02 

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.