#include <stdio.h>
#include <stdlib.h>
void main(void *, void *)
{
int M=10,N=15,i;
long data_length=M*N;
FILE *fp,*fp1;
if((fp1=fopen("J:\\SLA-3Dprinter\\20170103develop\\20170107SLdevelop\\tooth-models\\package\\toothoneslice.txt","wt+")) == NULL)
//判断文件(txt文件)是否打开成功
//w+ 打开可读写文件,若文件存在则文件长度清为零,
//即该文件内容会消失。若文件不存在则建立该文件。"t"为txt文件之意
{
printf("toothoneslice.txt cannot be opened! \n");
exit(0);
}
if((fp= fopen("J:\\SLA-3Dprinter\\20170103develop\\20170107SLdevelop\\tooth-models\\package\\molaire_finale(xiufu).CLI", "rb")) == NULL )//判断文件是否打开成功
//if((fp= fopen("J:\\SLA-3Dprinter\\20170103develop\\20170107SLdevelop\\tooth-models\\package\\Box_(2).bin", "rb")) == NULL )//判断文件是否打开成功
//r 打开只读文件,该文件必须存在。"rb"为打开二进制只读文件
{
printf("molaire_finale(xiufu).CLI cannot be opened! \n");
exit(0);
}
{
fseek(fp,0,SEEK_SET); //将文件指针的位置移动到文件的开始
short tmp;
// while(EOF!=fread(&tmp, 1, 1,fp))
while(!feof(fp))
{
//short tmp; //short为两个字节或一个字节。
fread(&tmp, 1, 1,fp);//读文件 读一次,每次读1个字节,读入到tmp
fprintf(fp1,"%c",tmp);//写文件
//文件结束时,关闭文件
//while(EOF!=fp.Read(void *,int])){...}fp.Close();
//文件结束时,关闭文件
}
fclose(fp);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
IOBin.zip (33个子文件)
IOBin
IOBin.sdf 2.02MB
ipch
iobin-534affbd
iobin-b2223efd.ipch 1.88MB
IOBin.suo 10KB
Debug
IOBin.pdb 355KB
IOBin.exe 29KB
IOBin.ilk 317KB
IOBin
IOBin(2).cpp 1KB
IOBin.vcxproj.filters 943B
IOBin(4).cpp 1KB
IOBin(3).cpp 1KB
Debug
CL.write.1.tlog 1KB
vc100.idb 51KB
mt.read.1.tlog 862B
IOBin.obj 7KB
link.command.1.tlog 1KB
vc100.pdb 60KB
CL.read.1.tlog 2KB
mt.write.1.tlog 404B
IOBin.lastbuildstate 102B
IOBin.vcxprojResolveAssemblyReference.cache 713B
mt.command.1.tlog 576B
link.write.1.tlog 932B
IOBin.write.1.tlog 0B
cl.command.1.tlog 1KB
IOBin.exe.intermediate.manifest 381B
IOBin.log 3KB
link.read.1.tlog 3KB
IOBin(2).obj 7KB
IOBin.vcxproj 3KB
IOBin.cpp 1KB
IOBin(1).cpp 1KB
IOBin.vcxproj.user 143B
IOBin.sln 882B
共 33 条
- 1
资源评论
guzi19801130
- 粉丝: 2
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功