Click here to Skip to main content
15,920,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionABOUT CONCATINATION Pin
savitri24-Mar-08 20:37
savitri24-Mar-08 20:37 
QuestionRe: ABOUT CONCATINATION [modified] Pin
Rajkumar R24-Mar-08 20:52
Rajkumar R24-Mar-08 20:52 
GeneralRe: ABOUT CONCATINATION Pin
Peter Weyzen25-Mar-08 19:48
Peter Weyzen25-Mar-08 19:48 
Question'ImageList_AddIcon': identifier not found Pin
hitonly200824-Mar-08 19:30
hitonly200824-Mar-08 19:30 
GeneralRe: 'ImageList_AddIcon': identifier not found Pin
Rajkumar R24-Mar-08 20:37
Rajkumar R24-Mar-08 20:37 
GeneralRe: 'ImageList_AddIcon': identifier not found Pin
hitonly200824-Mar-08 22:40
hitonly200824-Mar-08 22:40 
GeneralRe: 'ImageList_AddIcon': identifier not found Pin
Rajkumar R25-Mar-08 0:09
Rajkumar R25-Mar-08 0:09 
Questionhelp about this stack overflow? Pin
wendyyue24-Mar-08 19:29
wendyyue24-Mar-08 19:29 
#include <stdio.h>
#include <malloc.h>


int min(int a, int b, int c)
{

int temp=a<=b?a:b;

return temp<=c?temp:c;

}

int MinOperation(int len1, char str1[], int len2, char str2[])
{
int count[10001][10001];
int i,j;


for(i=0; i<1001; i++)
count[0][i]=0;

for(i=0; i<1001; i++)
count[i][0]=0;

for(i=1; i<=len1; i++)
for(j=1; j<=len2; j++)
{
if(str1[i]==str2[j])
count[i][j]=min( count[i-1][j-1], count[i-1][j]+1, count[i][j-1]+1);
else
count[i][j]=min( count[i-1][j-1]+1, count[i][j-1]+1, count[i-1][j]+1 );
}
return count[len1][len2];
}


void main()
{

int i=0;
int len1;
int len2;
char str1[1001];
char str2[1001];


scanf("%d%s", len1, (str1) );
scanf("%d%s", len2, (str2) );

puts(str1);
puts(str2);

printf("%d", MinOperation(len1 ,str1 ,len2 ,str2));

}

I am not sure why there exist a bug stack overflow?
AnswerRe: help about this stack overflow? Pin
Rajkumar R24-Mar-08 20:29
Rajkumar R24-Mar-08 20:29 
GeneralDocking Windows Pin
suhi24-Mar-08 19:12
suhi24-Mar-08 19:12 
GeneralRe: Docking Windows Pin
Rajasekharan Vengalil24-Mar-08 19:37
Rajasekharan Vengalil24-Mar-08 19:37 
Generalunicode characterset Vs mutibyte Character set Pin
rowdy_vc++24-Mar-08 18:35
rowdy_vc++24-Mar-08 18:35 
GeneralRe: unicode characterset Vs mutibyte Character set Pin
Rajasekharan Vengalil24-Mar-08 19:35
Rajasekharan Vengalil24-Mar-08 19:35 
GeneralRe: unicode characterset Vs mutibyte Character set Pin
Mark Salsbery25-Mar-08 5:58
Mark Salsbery25-Mar-08 5:58 
GeneralCompilation Error: MFC Activex Control Creation....... Pin
spalanivel24-Mar-08 18:16
spalanivel24-Mar-08 18:16 
GeneralRe: Compilation Error: MFC Activex Control Creation....... Pin
Rajasekharan Vengalil24-Mar-08 19:31
Rajasekharan Vengalil24-Mar-08 19:31 
GeneralRe: Compilation Error: MFC Activex Control Creation....... Pin
David Crow25-Mar-08 3:57
David Crow25-Mar-08 3:57 
Generalnmake problem - dependency tree Pin
charlieg24-Mar-08 9:11
charlieg24-Mar-08 9:11 
GeneralRe: nmake problem - dependency tree Pin
Matthew Faithfull24-Mar-08 23:58
Matthew Faithfull24-Mar-08 23:58 
GeneralRe: nmake problem - dependency tree Pin
charlieg25-Mar-08 4:38
charlieg25-Mar-08 4:38 
GeneralRe: nmake problem - dependency tree Pin
Matthew Faithfull25-Mar-08 5:01
Matthew Faithfull25-Mar-08 5:01 
GeneralRe: nmake problem - dependency tree Pin
Member 75496026-Mar-08 5:12
Member 75496026-Mar-08 5:12 
GeneralRe: nmake problem - dependency tree Pin
charlieg26-Mar-08 18:29
charlieg26-Mar-08 18:29 
QuestionRe: nmake problem - dependency tree Pin
David Crow25-Mar-08 4:03
David Crow25-Mar-08 4:03 
GeneralRe: nmake problem - dependency tree Pin
charlieg25-Mar-08 4:32
charlieg25-Mar-08 4:32 

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.