int sizeA1=sizeof(array1[3])/sizeof(array1[0]);
int sizeA2=sizeof(array2[3])/sizeof(array2[0]);
int sizeA3=sizeof(array3[3])/sizeof(array3[0]);
for (int i=0; i < sizeA1; i++)
{
for (int j = 0; j < sizeA3; j++)
{
if(array1[i]==array3[j])
newarray2[m]=array1[i];
Memo4->Lines->Add(IntToStr(newarray2[m]));
}
}
I don't know where the miskate is, the memo displays 0, but it should display de common element between two arrays (i know there is one because i have the arrays displayed in another 2 memos)
This post has been edited by jimblumberg: 20 January 2013 - 05:16 PM
Reason for edit:: Added missing code tags. Please learn to use them properly.

New Topic/Question
Reply



MultiQuote







|