- 91
- 0
- 约4.05千字
- 约 17页
- 2017-07-24 发布于河南
- 举报
c读取文件(Creadsthefile)
c++读取文件(C++ reads the file)
#包括“stdio. h”
#包括“fstream对象。”
#包括“iStream。”
/ /心率震荡分析参数计算-----------------
/ / -------------------------------------
/ /坐标的计算-----------------------------------
浮get_y(int int_zero,int int_ggg,int int_adc_zengyi,int int_ybase,浮flo_ydate)/什么是Y的中线
{
浮Y;
浮动收益;
收益=(浮动)40 / int_ggg GGG一般是;/ / 409
Y = int_ybase -(flo_ydate-int_zero)*得到* int_adc_zengyi;
回到Y;
}
/ / ---------------------------------------------
/ /得到参数值---------------
浮get_dat(INT ADC,int DAT)
{
浮dou_singlefudu;
dou_singlefudu =(浮动)DAT / ADC;
返回dou_singlefudu;
}
/ / ---------------------------
/ /打开文件------------
无效open_read_hea()
{
ifstream f(“100热”,ios::in);
如果(!F. is_open())
{
printf(“打开文件错误!“n);
返回;
}
字符c;
ofstream F2(“open_read_hea .txt”,ios::::|了iOS应用程序);
如果(!F2 is_open())。
{
cout “打开文件错误!”;
返回;
}
而(!F. eof())
{
C = F get();
F2<c;
cout C;/ /问题,文件读取结束的时候前面有两个空格
}
cout “健康读出数据:完成” endl;
}
无效open_read_dat()
{
ifstream f(“100。DAT”,iOS::在| ios::binary);
如果(!F. is_open())
{
cout “打开文件101.dat错误!” endl;
返回;
}
ofstream F2(“open_read_dat .txt”,ios::::|了iOS应用程序);
如果(!F2 is_open())。
{
cout “打开文件open_read_dat错误!” endl;
返回;
}
无符号字符;
int = 0;
(n<60)
{
f.get(C);
/ / cout “111” endl;
/ / cout (int)C;
F2 (int)c;
cout 进制;/ /以十六进制输出数据
cout (int)C endl;
氮+;
}
printf(“\n DAT文件读出:完成\n”);
}
无效open_read_atr()
{
ifstream f(“100。ATR”,iOS::在| ios::binary);
如果(!F. is_open())
{
cout “打开文件100.art错误!” endl;
返回;
}
ofstream F2(“open_read_art .txt”,ios::::|了iOS应用程序);
如果(!F2 is_open())。
{
cout “打开文件”open_read_art。
txt错误! endl;
返回;
}
int = 0;
无符号字符;
(n<200)
{
f.get(C);
F2 (int)c;
cout (int)C endl;
氮+;
}
printf(“注释文件读取:完成\n”);
}
/ /从文件中获取信息----------------------------
无效read_hea()
{
结构read_hea_firstline
{
焦char_filename [ 20 ];//该文件的名称
国际int_countsingle;/ /采样信号个数
双int_pinlv;/ /频率
双dou_singlelength;/ /信号长度
};
结构read_hea_single
{
焦char_datafilename [ 20 ];//包含信号的文件名
国际char_storeformat;/ /信号格式
国际int_adczengyi;/ / ADC增益值
国际int_adcfenbianlv;/ / ADC分辨率
国际int_adczero;/ / ADC零值
双dou_firstgetpoint;/ /第一采样点
双dou_jiaoya
您可能关注的文档
- fp机械轴承hhe(FP mechanical bearing HHE).doc
- from 天涯 今天在食堂遇到了高手...(From Tianya meets a superior in the cafeteria today...).doc
- frontpage网页制作作业题目(Frontpage web page production exercises).doc
- frontpage 新增14道题(Frontpage added 14 questions).doc
- fttb+lan宽带小区的几种布线设计方法(Several routing design methods for fttb+lan broadband cell).doc
- frountpage(frountpage).doc
- ft社评普京的赌博(FT editorial Putin gamble).doc
- freeglut安装(freeglut安装).doc
- fttblan宽带小区的几种布线设计方法(Several routing design methods for fttblan broadband cell).doc
- fpga设计实用经验(Practical experience in FPGA design).doc
- 2026年中国轻便展柜行业市场数据调查、监测研究报告.docx
- 2026年中国升降照明车行业市场数据调查、监测研究报告.docx
- 2026年中国静音商用锅炉行业市场数据调查、监测研究报告.docx
- 2026年中国津田驹整经机经轴行业市场数据调查、监测研究报告.docx
- 2026年中国数字切换台行业市场数据调查、监测研究报告.docx
- 2026年中国家用纯水矿化机行业市场数据调查、监测研究报告.docx
- 2026年中国阻燃布带行业市场数据调查、监测研究报告.docx
- 2026年中国大功率机动泵行业市场数据调查、监测研究报告.docx
- 2026年中国调温调湿试验箱行业市场数据调查、监测研究报告.docx
- 2026年中国长轧钢丝球行业市场数据调查、监测研究报告.docx
原创力文档

文档评论(0)