Oh yea, two other things...
It's not necessary to do
As ios::out is redundant
And to clear up something for the others
In that code, output.close(); is also redundant because once the file object falls out of scope, the destructor is called and the file is automatically closed... you can however, do this... it's just not necessary here
for (int i = 0; i < 100; ++i)
output << "testing " << i << endl;