Click here to Skip to main content
15,885,957 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding ATL Support to MFC DLL Pin
a_kiani20-Feb-06 1:10
a_kiani20-Feb-06 1:10 
AnswerRe: Adding ATL Support to MFC DLL Pin
ThatsAlok17-Feb-06 3:13
ThatsAlok17-Feb-06 3:13 
GeneralRe: Adding ATL Support to MFC DLL Pin
zahedeh19-Feb-06 21:16
zahedeh19-Feb-06 21:16 
QuestionCopy large amount of data to clipboard Pin
t2x16-Feb-06 3:38
t2x16-Feb-06 3:38 
AnswerRe: Copy large amount of data to clipboard Pin
Tim Smith16-Feb-06 3:45
Tim Smith16-Feb-06 3:45 
AnswerRe: Copy large amount of data to clipboard Pin
James R. Twine16-Feb-06 4:19
James R. Twine16-Feb-06 4:19 
AnswerRe: Copy large amount of data to clipboard Pin
ThatsAlok17-Feb-06 3:11
ThatsAlok17-Feb-06 3:11 
Questionfast code Pin
Waldermort16-Feb-06 1:39
Waldermort16-Feb-06 1:39 
I'm trying to create a fast running algorithm to calculate combinations.

Think of 3 decks of cards without without the picture cards. This would give a total of 120 cards. Now if you were to choose 14 cards from those 120, how many combinations would there be without repeats and disregarding the order. Or more to the point, how could one generate the code to show all possible combinations?

My initial idea was to create an array of all 120 cards then create 14 nested for loops, create a combination and write it to a file. Then later go through the file erasing all duplicates. But this is hardly efficient least to mention good coding. This method would also take an extremly long time. Most of the time being wasted on creating impossible combinations (more than 4 ones)

I am now tempted to create a function to randomly pick 14 of those cards, and write it to a file. But this is going to give inacurate results. There must be some sort of algorithm which can do this.
AnswerRe: fast code Pin
James R. Twine16-Feb-06 1:58
James R. Twine16-Feb-06 1:58 
JokeRe: fast code Pin
Ryan Binns16-Feb-06 17:21
Ryan Binns16-Feb-06 17:21 
AnswerRe: fast code Pin
David Crow16-Feb-06 3:13
David Crow16-Feb-06 3:13 
JokeRe: fast code Pin
James R. Twine16-Feb-06 3:17
James R. Twine16-Feb-06 3:17 
Questionunicode to char? Pin
9ine16-Feb-06 1:36
9ine16-Feb-06 1:36 
AnswerRe: unicode to char? Pin
9ine16-Feb-06 1:37
9ine16-Feb-06 1:37 
GeneralRe: unicode to char? Pin
ThatsAlok16-Feb-06 3:05
ThatsAlok16-Feb-06 3:05 
AnswerRe: unicode to char? Pin
James R. Twine16-Feb-06 1:51
James R. Twine16-Feb-06 1:51 
GeneralRe: unicode to char? Pin
PJ Arends16-Feb-06 7:24
professionalPJ Arends16-Feb-06 7:24 
JokeRe: unicode to char? Pin
James R. Twine16-Feb-06 8:08
James R. Twine16-Feb-06 8:08 
QuestionParameters idenfying a system particularly windows Pin
cpp_prgmer16-Feb-06 0:52
cpp_prgmer16-Feb-06 0:52 
AnswerRe: Parameters idenfying a system particularly windows Pin
James R. Twine16-Feb-06 1:01
James R. Twine16-Feb-06 1:01 
Questionpurpose of undef in the code Pin
arunperi15-Feb-06 22:42
arunperi15-Feb-06 22:42 
AnswerRe: purpose of undef in the code Pin
toxcct15-Feb-06 23:02
toxcct15-Feb-06 23:02 
GeneralRe: purpose of undef in the code Pin
arunperi15-Feb-06 23:32
arunperi15-Feb-06 23:32 
GeneralRe: purpose of undef in the code Pin
toxcct15-Feb-06 23:35
toxcct15-Feb-06 23:35 
GeneralRe: purpose of undef in the code Pin
arunperi15-Feb-06 23:48
arunperi15-Feb-06 23:48 

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.