学会对文件的记录锁定,及解锁。#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
int fd
int i
struct {
char name[20]
uint ID
int age
} myrec
fd =open("name", O_RDWR|O_CREAT, 0755)
if (fd == -1) return -1
printf("Input your name:") scanf("%s", myrec.name)
...