Why doesn't remove() function work with files that I have had open in fstreams?

I always end up getting:
Error deleting file: Permission denied
What does this mean?

I've tried closing the fstream, clearing the flags of the fstream. What's wrong?
Never mind again! I had had a second fstream to test if it had been opened correctly. I never bothed to close the second fstream!
Topic archived. No new replies allowed.