I don't understand how the == 0 works. If the statement doesn't make sense here is where I got it from an example from Ivan Hortons book. The example finds prime numbers, but that is not important, I just don't how or what the == 0 does.
Here is a snippet of the example code:
for(int i = 0; i < count; i++)
{
found = (trial % *(primes + i)) == 0; //true for exact division
if(found)
break;
}
if(found ==0)
*(primes + count++) = trial; //found a prime assign it to prime array.
If I take out the == 0 from: found = (trial % *(primes + i)) == 0;
found is always 1 or true. I don't understand how this works.