D
DERosenblum
Hi, I'm a total newbie at programming. I am looking to compare the an
element of array2 with the next element of array2, and if equal, put a
1 in the same spot of array3.
For example, if array2[2][3] has the same value as array2[3][3], then
I want the value of array3[2][3] to be 1. My code looks like this,
thanks!!
char array2[5][10][20];
char array3[5][10];
//arrays are already populated
for(int a=0; a<5; a++)
{
for(i=0; i<10; i++)
{
if(array2[a] == array2[a+1]
{
array3[a]=1
}
}
}
element of array2 with the next element of array2, and if equal, put a
1 in the same spot of array3.
For example, if array2[2][3] has the same value as array2[3][3], then
I want the value of array3[2][3] to be 1. My code looks like this,
thanks!!
char array2[5][10][20];
char array3[5][10];
//arrays are already populated
for(int a=0; a<5; a++)
{
for(i=0; i<10; i++)
{
if(array2[a] == array2[a+1]
{
array3[a]=1
}
}
}