Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32 MDI child creation w/ lParam Pin
spoulson29-Jul-03 1:21
spoulson29-Jul-03 1:21 
QuestionFucntion declaration??? Pin
Bob Stanneveld25-Jul-03 23:42
Bob Stanneveld25-Jul-03 23:42 
AnswerRe: Fucntion declaration??? Pin
Andrew Walker26-Jul-03 0:00
Andrew Walker26-Jul-03 0:00 
GeneralRe: Fucntion declaration??? Pin
Bob Stanneveld26-Jul-03 0:03
Bob Stanneveld26-Jul-03 0:03 
GeneralPermutations Pin
doctorpi25-Jul-03 22:20
doctorpi25-Jul-03 22:20 
GeneralRe: Permutations Pin
phlipping25-Jul-03 22:51
phlipping25-Jul-03 22:51 
GeneralRe: Permutations Pin
doctorpi26-Jul-03 20:53
doctorpi26-Jul-03 20:53 
GeneralRe: Permutations Pin
Dudi Avramov27-Jul-03 2:22
Dudi Avramov27-Jul-03 2:22 
try this (not for repeated chars):
#include "stdafx.h"
#include <stdio.h>
#include <string.h>

void swap(char* pc1,char* pc2)
{
	char ch;
	ch = *pc1;
	*pc1 = *pc2;
	*pc2 = ch;
}

void perm (char* s,int pos)
{
	if (pos == (int)strlen(s))		
	{
		printf("%s\n",s);
		return;
	}

	for (int i=pos;i < (int)strlen(s);i++)
	{
		swap(s+pos,s+i);
		perm(s,pos+1);
		swap(s+pos,s+i);
	}

}


int main(int argc, char* argv[])
{
	char s[] = "abc";
	perm(s,0);
	return 0;
}

Generali guysPermutations Pin
Anonymous25-Jul-03 22:13
Anonymous25-Jul-03 22:13 
GeneralExtended chars in SendInput Pin
phlipping25-Jul-03 21:27
phlipping25-Jul-03 21:27 
GeneralQuestion about stdin under multi-process environment. Pin
George225-Jul-03 19:22
George225-Jul-03 19:22 
GeneralRe: Question about stdin under multi-process environment. Pin
Johnny ²25-Jul-03 21:24
Johnny ²25-Jul-03 21:24 
GeneralRe: Question about stdin under multi-process environment. Pin
George225-Jul-03 21:36
George225-Jul-03 21:36 
GeneralRe: Question about stdin under multi-process environment. Pin
Ryan Binns25-Jul-03 23:15
Ryan Binns25-Jul-03 23:15 
GeneralRe: Question about stdin under multi-process environment. Pin
George226-Jul-03 0:58
George226-Jul-03 0:58 
GeneralRe: Question about stdin under multi-process environment. Pin
Ryan Binns26-Jul-03 1:01
Ryan Binns26-Jul-03 1:01 
GeneralRe: Question about stdin under multi-process environment. Pin
George226-Jul-03 1:05
George226-Jul-03 1:05 
GeneralRe: Question about stdin under multi-process environment. Pin
Ryan Binns26-Jul-03 2:10
Ryan Binns26-Jul-03 2:10 
GeneralRe: Question about stdin under multi-process environment. Pin
George226-Jul-03 2:16
George226-Jul-03 2:16 
GeneralRe: Question about stdin under multi-process environment. Pin
Ryan Binns26-Jul-03 2:38
Ryan Binns26-Jul-03 2:38 
GeneralRe: Question about stdin under multi-process environment. Pin
George226-Jul-03 2:44
George226-Jul-03 2:44 
GeneralRe: Question about stdin under multi-process environment. Pin
Johnny ²26-Jul-03 4:28
Johnny ²26-Jul-03 4:28 
GeneralRe: Question about stdin under multi-process environment. Pin
George226-Jul-03 16:48
George226-Jul-03 16:48 
GeneralRe: Question about stdin under multi-process environment. Pin
Johnny ²26-Jul-03 21:30
Johnny ²26-Jul-03 21:30 
GeneralRe: Question about stdin under multi-process environment. Pin
George227-Jul-03 1:14
George227-Jul-03 1:14 

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.