The problem is:
1. Design a file system for N users. Each user can save up to M files.
2. Only one file can be opened at a time.
3. The system should be able to check the correctness of the input command, and the cause of the error should be displayed.
4. You must set protection measures for files, such as read-only, write, and execution. You can set the protection level again when you enable it each time.
5. There are at least the following commands for file operations:
Create: create a file
Delete: delete an object
Open: open a file
Close: Close the file
Read: read an object.
Write: Write a file
I want to ask:
1. Which function in the fstream. h header file can be used to delete files?
2. After installing msdn, how can I see the methods of ifstream or ofstream objects? For example, EOF ()?
I have a C ++ standard template library in hand, but I think it is almost useless. The fstream description does not mention functions such as deletion.
If you are familiar with the Runtime Library, you can also consider the Runtime Library
System ("");
The command for adding DOS to quotation marks is also OK.
INT system (const char * command)
Using the above function, the command is the console command you need to call, such as del and rmdir.