Click here to Skip to main content
15,884,425 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed help with cryptography Pin
SMD1111-Nov-16 8:54
SMD1111-Nov-16 8:54 
AnswerRe: Need help with cryptography Pin
Randor 1-Nov-16 19:04
professional Randor 1-Nov-16 19:04 
Question[C]Problem in creating a random string Pin
xXxRevolutionxXx27-Oct-16 1:31
xXxRevolutionxXx27-Oct-16 1:31 
AnswerRe: [C]Problem in creating a random string Pin
Richard MacCutchan27-Oct-16 1:46
mveRichard MacCutchan27-Oct-16 1:46 
GeneralRe: [C]Problem in creating a random string Pin
k505427-Oct-16 4:47
mvek505427-Oct-16 4:47 
GeneralRe: [C]Problem in creating a random string Pin
Richard MacCutchan27-Oct-16 4:55
mveRichard MacCutchan27-Oct-16 4:55 
AnswerRe: [C]Problem in creating a random string Pin
Jochen Arndt27-Oct-16 2:35
professionalJochen Arndt27-Oct-16 2:35 
AnswerRe: [C]Problem in creating a random string Pin
leon de boer27-Oct-16 3:43
leon de boer27-Oct-16 3:43 
What Jochem said .. RTM and look at the examples you need to use the MODULO trick

Can you also please put this line up before the i loop
srand(time(NULL));

That just sets the random seed to the current time tick which updates every second again RTM on C standard time function.

I assure you that loop will complete far faster than 1 second on any decent computer so you are wasting time setting the same seed i times.

You might as well just do it once before the loop Smile | :)
In vino veritas


modified 27-Oct-16 9:49am.

SuggestionRe: [C]Problem in creating a random string Pin
David Crow27-Oct-16 4:48
David Crow27-Oct-16 4:48 
GeneralRe: [C]Problem in creating a random string Pin
Daniel Pfeffer27-Oct-16 5:11
professionalDaniel Pfeffer27-Oct-16 5:11 
AnswerRe: [C]Problem in creating a random string Pin
Krishnakumartg27-Oct-16 20:18
Krishnakumartg27-Oct-16 20:18 
GeneralRe: [C]Problem in creating a random string Pin
k505428-Oct-16 4:59
mvek505428-Oct-16 4:59 
PraiseRe: [C]Problem in creating a random string Pin
Krishnakumartg30-Oct-16 18:50
Krishnakumartg30-Oct-16 18:50 
QuestionRe: [C]Problem in creating a random string Pin
David Crow31-Oct-16 2:31
David Crow31-Oct-16 2:31 
QuestionUsing COM in DLL called by .Net application Pin
Leif Simon Goodwin26-Oct-16 3:02
Leif Simon Goodwin26-Oct-16 3:02 
AnswerRe: Using COM in DLL called by .Net application Pin
Richard Deeming26-Oct-16 3:11
mveRichard Deeming26-Oct-16 3:11 
PraiseSOLVED Pin
Leif Simon Goodwin9-Nov-16 5:32
Leif Simon Goodwin9-Nov-16 5:32 
AnswerRe: Using COM in DLL called by .Net application Pin
«_Superman_»26-Oct-16 20:47
professional«_Superman_»26-Oct-16 20:47 
GeneralRe: Using COM in DLL called by .Net application Pin
Leif Simon Goodwin8-Nov-16 20:53
Leif Simon Goodwin8-Nov-16 20:53 
QuestionError in returning array of int as reference Pin
Korowai22-Oct-16 19:35
Korowai22-Oct-16 19:35 
AnswerRe: Error in returning array of int as reference Pin
Graham Breach22-Oct-16 21:46
Graham Breach22-Oct-16 21:46 
GeneralRe: Error in returning array of int as reference Pin
Korowai22-Oct-16 22:41
Korowai22-Oct-16 22:41 
GeneralRe: Error in returning array of int as reference Pin
Midi_Mick22-Oct-16 23:12
professionalMidi_Mick22-Oct-16 23:12 
GeneralRe: Error in returning array of int as reference Pin
Korowai23-Oct-16 2:39
Korowai23-Oct-16 2:39 
GeneralRe: Error in returning array of int as reference Pin
leon de boer23-Oct-16 4:24
leon de boer23-Oct-16 4:24 

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.