- Joined
- Aug 15, 2023
- Messages
- 1
- Reaction score
- 0
For some reason that i don't know my program is ignoring this line of my code:
for(n=0;n++
{
printf("%s",&contatosnovos[n].nome);
}
This isn't even the main problem. This is just a change I just made to find what's happening. The real matter is: I'm trying to walk through an array and verify if there's something written at that location. However the program just gets out of the loop before it reachs a location that is supposed to be empty. Here's how it was originally written:
for(n=0;contatosnovos[n].nome!=0;n++
{
cont++;
}
But it doesn't matter what i do. The program refuses to keep on the loop. It just happens in this specif line even though my code has similar lines in which it doesn't happe. Any ideas?
for(n=0;n++
printf("%s",&contatosnovos[n].nome);
}
This isn't even the main problem. This is just a change I just made to find what's happening. The real matter is: I'm trying to walk through an array and verify if there's something written at that location. However the program just gets out of the loop before it reachs a location that is supposed to be empty. Here's how it was originally written:
for(n=0;contatosnovos[n].nome!=0;n++
cont++;
}
But it doesn't matter what i do. The program refuses to keep on the loop. It just happens in this specif line even though my code has similar lines in which it doesn't happe. Any ideas?