15,844,009 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: Need help with cryptography `Randor` 1-Nov-16 20:04 `Randor` 1-Nov-16 20:04
 [C]Problem in creating a random string xXxRevolutionxXx27-Oct-16 2:31 xXxRevolutionxXx 27-Oct-16 2:31
 Re: [C]Problem in creating a random string Richard MacCutchan27-Oct-16 2:46 Richard MacCutchan 27-Oct-16 2:46
 Re: [C]Problem in creating a random string k505427-Oct-16 5:47 k5054 27-Oct-16 5:47
 Re: [C]Problem in creating a random string Richard MacCutchan27-Oct-16 5:55 Richard MacCutchan 27-Oct-16 5:55
 Re: [C]Problem in creating a random string Jochen Arndt27-Oct-16 3:35 Jochen Arndt 27-Oct-16 3:35
 Re: [C]Problem in creating a random string leon de boer27-Oct-16 4:43 leon de boer 27-Oct-16 4:43
 Re: [C]Problem in creating a random string David Crow27-Oct-16 5:48 David Crow 27-Oct-16 5:48
 In addition to the other comments and suggestions: ```_TCHAR *ReturnRandomString( int Range ) { _TCHAR *Ptr_str = (_TCHAR *) malloc(Range + 1); int i; for (i = 0; i < Range; i++) { int RandomInt = rand() % 26; Ptr_str[i] = (_TCHAR) (RandomInt + 97); } Ptr_str[i] = _T('\0'); return Ptr_str; } ... srand(time(NULL)); _TCHAR *PtrCharArray = ReturnRandomString(5); _tprintf(_T("String Array returned: %s\n"), PtrCharArray); free(PtrCharArray);``` "One man's wage rise is another man's price increase." - Harold Wilson"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
 Re: [C]Problem in creating a random string Daniel Pfeffer27-Oct-16 6:11 Daniel Pfeffer 27-Oct-16 6:11
 Re: [C]Problem in creating a random string Krishnakumartg27-Oct-16 21:18 Krishnakumartg 27-Oct-16 21:18
 Re: [C]Problem in creating a random string k505428-Oct-16 5:59 k5054 28-Oct-16 5:59
 Re: [C]Problem in creating a random string Krishnakumartg30-Oct-16 19:50 Krishnakumartg 30-Oct-16 19:50
 Re: [C]Problem in creating a random string David Crow31-Oct-16 3:31 David Crow 31-Oct-16 3:31
 Using COM in DLL called by .Net application Leif Simon Goodwin26-Oct-16 4:02 Leif Simon Goodwin 26-Oct-16 4:02
 Re: Using COM in DLL called by .Net application Richard Deeming26-Oct-16 4:11 Richard Deeming 26-Oct-16 4:11
 SOLVED Leif Simon Goodwin9-Nov-16 6:32 Leif Simon Goodwin 9-Nov-16 6:32
 Re: Using COM in DLL called by .Net application «_Superman_»26-Oct-16 21:47 «_Superman_» 26-Oct-16 21:47
 Re: Using COM in DLL called by .Net application Leif Simon Goodwin8-Nov-16 21:53 Leif Simon Goodwin 8-Nov-16 21:53
 Error in returning array of int as reference Korowai22-Oct-16 20:35 Korowai 22-Oct-16 20:35
 Re: Error in returning array of int as reference Graham Breach22-Oct-16 22:46 Graham Breach 22-Oct-16 22:46
 Re: Error in returning array of int as reference Korowai22-Oct-16 23:41 Korowai 22-Oct-16 23:41
 Re: Error in returning array of int as reference Midi_Mick23-Oct-16 0:12 Midi_Mick 23-Oct-16 0:12
 Re: Error in returning array of int as reference Korowai23-Oct-16 3:39 Korowai 23-Oct-16 3:39
 Re: Error in returning array of int as reference leon de boer23-Oct-16 5:24 leon de boer 23-Oct-16 5:24
 Re: Error in returning array of int as reference Korowai23-Oct-16 9:11 Korowai 23-Oct-16 9:11
 Last Visit: 31-Dec-99 19:00     Last Update: 21-Feb-24 18:25 Refresh ᐊ Prev1...376377378379380381382383384385 Next ᐅ