-2
In the following function I want to compare the elements of a array of 1000, but I can’t find a way to successfully compare them, even using strcmp()
.
void verifica_conta(int *ptr) {
int i; //Posição
for(i = 0; i < 1000; i++){
if(strcmp(*ptr, *(ptr+i)) == 0) {
printf("\tConta já existente\n");
}
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero