The next function should turn variables into lowercase and then compare them. I've tried converting before, but also bugou . Arithmetic use of pointers next to variables of struct
. Pointer points to struct
.
How to fix the error in the following code snippet:
struct registro{
char conta[50], senha[50], usuario[50];
}atual[1000], *ptr;
int verifica_usuario(int *ptr){
int i;
for(i = 0; i < *ptr; i++) {
if(strcmp(tolower(atual[*ptr].usuario), tolower(atual[i].usuario)) == 0) {
return 0;
}
}
return 1;
}