2-3 几种文件复制方法-文件访问
摘要:
(1)文件复制----单字符#include <unistd.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>int main(){ char c; int in,out; in=open("read1.c", O_RDONLY); out=open("write1.c",O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR); while(read(in,&c,1)==1) write(out,&c,1); 阅读全文
posted @ 2011-08-26 23:52 胡神 阅读(1009) 评论(0) 推荐(0) 编辑