Click here to Skip to main content
15,892,072 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIs this correct? Pin
kakan13-Feb-06 20:01
professionalkakan13-Feb-06 20:01 
GeneralRe: I got question Pin
ThatsAlok14-Feb-06 21:42
ThatsAlok14-Feb-06 21:42 
QuestionHow often do you use makefiles? Pin
Nick_Kisialiou13-Feb-06 18:32
Nick_Kisialiou13-Feb-06 18:32 
AnswerRe: How often do you use makefiles? Pin
Rage13-Feb-06 22:18
professionalRage13-Feb-06 22:18 
QuestionRe: How often do you use makefiles? Pin
BadKarma13-Feb-06 22:29
BadKarma13-Feb-06 22:29 
GeneralRe: How often do you use makefiles? Pin
Nick_Kisialiou13-Feb-06 22:36
Nick_Kisialiou13-Feb-06 22:36 
QuestionPermutations of a Binary String Pin
birddog20013-Feb-06 17:01
birddog20013-Feb-06 17:01 
AnswerRe: Permutations of a Binary String Pin
Ryan Binns13-Feb-06 17:27
Ryan Binns13-Feb-06 17:27 
Well, if you look at the pattern, you'd find that the permutation of 3 bits is made up of two distinct halves - a '0' followed by the permutation of two bits, and a '1' followed by the permutation of two bits.

Make a function that takes in N and a prefix of the bits already determined as parameters...
void permute(int n, std::string prefix)
such that if you call it as permute(2, "0"), it would print all the permutations of 2 bits with a '0' in front of each one.

If you think about it, notice that a permutation of 3 bits is then
permute(2, "0");
permute(2, "1");
and a permutation of 4 bits is
permute(3, "0");
permute(3, "1");
Notice the pattern?

See how you go with this

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

AnswerRe: Permutations of a Binary String Pin
Stephen Hewitt13-Feb-06 17:33
Stephen Hewitt13-Feb-06 17:33 
AnswerRe: Permutations of a Binary String Pin
Joshua Quick13-Feb-06 17:36
Joshua Quick13-Feb-06 17:36 
QuestionAssembly function to make a beep with PC speaker? Pin
Lord Kixdemp13-Feb-06 16:59
Lord Kixdemp13-Feb-06 16:59 
AnswerRe: Assembly function to make a beep with PC speaker? Pin
Ryan Binns13-Feb-06 17:09
Ryan Binns13-Feb-06 17:09 
Questionicon drew on the SDI view is of a square black backgroud Pin
zhonglin.liang13-Feb-06 16:20
zhonglin.liang13-Feb-06 16:20 
QuestionEmulator - I'm stuck (newbie) Pin
fear_the_weasel13-Feb-06 14:16
fear_the_weasel13-Feb-06 14:16 
AnswerRe: Emulator - I'm stuck (newbie) Pin
Stephen Hewitt13-Feb-06 15:43
Stephen Hewitt13-Feb-06 15:43 
AnswerRe: Emulator - I'm stuck (newbie) Pin
Michael Dunn13-Feb-06 15:45
sitebuilderMichael Dunn13-Feb-06 15:45 
GeneralRe: Emulator - I'm stuck (newbie) Pin
fear_the_weasel13-Feb-06 15:53
fear_the_weasel13-Feb-06 15:53 
QuestionWhite Space Pin
cuteee13-Feb-06 13:00
cuteee13-Feb-06 13:00 
AnswerRe: White Space Pin
George L. Jackson13-Feb-06 13:20
George L. Jackson13-Feb-06 13:20 
GeneralRe: White Space Pin
cuteee13-Feb-06 13:50
cuteee13-Feb-06 13:50 
QuestionMacros with a variable parameter list? Pin
PJ Arends13-Feb-06 12:56
professionalPJ Arends13-Feb-06 12:56 
AnswerRe: Macros with a variable parameter list? Pin
Ryan Binns13-Feb-06 13:21
Ryan Binns13-Feb-06 13:21 
AnswerRe: Macros with a variable parameter list? Pin
Michael Dunn13-Feb-06 15:49
sitebuilderMichael Dunn13-Feb-06 15:49 
Questioncolorful text in Edit? Pin
LeeeNN13-Feb-06 11:34
LeeeNN13-Feb-06 11:34 
AnswerRe: colorful text in Edit? Pin
RChin13-Feb-06 12:22
RChin13-Feb-06 12:22 

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.