I wrote a program, in which my code is checking the word entered by user and the word in a file. If the words are not same, the file is deleted.
i closed the file using fclose(fp), (where fp is file pointer)
and to delete the file i used system("del filename.txt").
But, i get a messsage saying that the file is in use by another process.
My question is HOW?? When I closed the file then how it can be in use of some other process??
Need assistance on this ... thanks!!
All 5 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.