Can anyone tell me if there is a function in c++ that will go through all elements in an array and say if there were any duplicates. E.g,
Array[]="aaa","aaaa","aaa"
elements 0 and 2 match.
Can anyone tell me if there is a function in c++ that will go through all elements in an array and say if there were any duplicates. E.g,
Array[]="aaa","aaaa","aaa"
elements 0 and 2 match.
there is no 'function' ... so code one yourself.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
int Check2(char *Array,int Size){
int i,j;
for(i=0;i<Size-1;i++)
for(j=Size-1;j>i;j--)
if(Array[i]==Array[j])
return 1;
return 0;
} /* End of Check2 */