You say you checked "the" directory. Which directory? Look around. Maybe it is not where you think.
And you should probably use ofstream for an output file:
1 2 3
ofstream out("primesBefore100.txt");
...
// and you don't need to explicitly close the file; the destructor will close it
Also, in isPrime you don't need to check divisors up to half the input, but only up to and including the square root of the input.
1 2 3 4 5 6 7 8 9
bool isPrime(int n)
{
if (i <= 2) return i == 2;
if (i % 2 == 0) returnfalse;
for (int i = 3; i * i <= n; i += 2)
if (n % i == 0)
returnfalse;
returntrue;
}