Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to desgine a chat software for voice in VC++ ? Please Help ! Pin
4-Jan-01 8:32
suss4-Jan-01 8:32 
AnswerRe: How to desgine a chat software for voice in VC++ ? Please Help ! Pin
26-Jan-01 0:34
suss26-Jan-01 0:34 
GeneralRe: How to desgine a chat software for voice in VC++ ? Please Help ! Pin
wildchaser29-May-01 19:12
wildchaser29-May-01 19:12 
GeneralRe: How to desgine a chat software for voice in VC++ ? Please Help ! Pin
Christian Graus29-May-01 19:21
protectorChristian Graus29-May-01 19:21 
QuestionHow to desgine a chat software for voice in VC++ ? Please Help ! Pin
4-Jan-01 8:30
suss4-Jan-01 8:30 
GeneralConsole text color Pin
4-Jan-01 6:59
suss4-Jan-01 6:59 
GeneralRe: Console text color Pin
Tim Deveaux4-Jan-01 8:21
Tim Deveaux4-Jan-01 8:21 
GeneralGenerating words Pin
4-Jan-01 6:56
suss4-Jan-01 6:56 
I want to code a program which generates all possible
combinations of characters with a flexible length and
store this characters in a file.

The second part is no problem (Put the characters in a file)

but how must the algorithm look like to generates this characters ???


I mean how can I code the following scenario...

Ok lets say a want to generate words with a length up to 3 characters !!!

So the output should look like this...

a
b
c
.
.
.
z
.
.
.
a a
a b
a c
a d
.
.
.
b a
b b
b c
.
.
.

till z z z


OK ....

My first very simple idea was to make 3 for - loops


int z1,z2,z3;

for (z1=1;z1<256;z1++)
{
for (z2=1;z2<256;z2++)
{
for (z3=1;z3<256;z3++)
{
printf(" %c, %c , %c",z1,z2,z3);
}
}
}

This should work fine... but I've got no chance to make it flexible...
I mean this works only with 3 characters at run-time !!!

But I want to make an input at the beginning where you can tell how many characters
you want... in this case you can't work with for - loops ?!?!?



Did anyone of you know how this problem can be solved ???


Malcomx
GeneralRe: Generating words Pin
Christian Graus4-Jan-01 10:55
protectorChristian Graus4-Jan-01 10:55 
GeneralRe: Generating words Pin
Christian Graus4-Jan-01 11:00
protectorChristian Graus4-Jan-01 11:00 
QuestionHow to use IPAdress Control in VB ?? Pin
Patrick4-Jan-01 2:09
Patrick4-Jan-01 2:09 
Generalgetting info about another process Pin
subir talukder4-Jan-01 1:39
subir talukder4-Jan-01 1:39 
Generalgetting info about another process Pin
subir talukder4-Jan-01 1:37
subir talukder4-Jan-01 1:37 
Generalgetting info about another process Pin
subir talukder4-Jan-01 1:37
subir talukder4-Jan-01 1:37 
GeneralMake Controls Invisible Pin
3-Jan-01 14:58
suss3-Jan-01 14:58 
GeneralRe: Make Controls Invisible Pin
Michael Dunn3-Jan-01 15:18
sitebuilderMichael Dunn3-Jan-01 15:18 
GeneralRe: Make Controls Invisible Pin
Masoud Samimi4-Jan-01 6:25
Masoud Samimi4-Jan-01 6:25 
QuestionAlternate CA for NT security? Pin
Jonathan Gilligan3-Jan-01 12:36
Jonathan Gilligan3-Jan-01 12:36 
General2's compliment Pin
Mike Zolna3-Jan-01 10:47
Mike Zolna3-Jan-01 10:47 
GeneralRe: 2's compliment Pin
Michael Dunn3-Jan-01 15:25
sitebuilderMichael Dunn3-Jan-01 15:25 
GeneralRe: 2's compliment Pin
Tim Deveaux4-Jan-01 8:34
Tim Deveaux4-Jan-01 8:34 
QuestionGZIP file compression suggestions? Pin
Josh Knox3-Jan-01 9:30
Josh Knox3-Jan-01 9:30 
AnswerRe: GZIP file compression suggestions? Pin
Jonathan Gilligan3-Jan-01 12:25
Jonathan Gilligan3-Jan-01 12:25 
GeneralGetDeviceCaps, C1_TRANSPARENT, CAPS1 and NEWTRANSPARENT Pin
Marc Richarme3-Jan-01 8:31
Marc Richarme3-Jan-01 8:31 
GeneralRe: GetDeviceCaps, C1_TRANSPARENT, CAPS1 and NEWTRANSPARENT Pin
3-Jan-01 10:22
suss3-Jan-01 10: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.