vendredi 20 novembre 2015

IOS how to compare two array with different values and number of elements

I have two array, array A has 4 elements and array B has 10 elements. How to compare this two array together to find out whether array A has values that contains in array B.

Here is the codes.

   for(int i = 0; i <= deepsightSig.count; i++){
    for(int p = 0; p <= feeds.count; i++){


        if(feeds[i] == deepsightSig[i]){

            badIPCount++;


        }
        else
            goodIPCount++;

    }


}

Aucun commentaire:

Enregistrer un commentaire