当前位置: 首页 > news >正文

网站建设的开多少税率东莞企业网站设计公司

网站建设的开多少税率,东莞企业网站设计公司,西安做网站多钱,青海省公路建设网站本作业主要考察:C二进制文件读写二进制文件读写是格式化数据的持久化的基础,就算是像数据库这种大型的复杂的系统软件,其原理也就是建立在格式化文件读写的基础上的。C中级程序员教程C读写文本文件的请移步这里需求如下:实现代码完…

本作业主要考察:C++二进制文件读写

二进制文件读写是格式化数据的持久化的基础,就算是像数据库这种大型的复杂的系统软件,其原理也就是建立在格式化文件读写的基础上的。

C++中级程序员教程

C++读写文本文件的请移步这里

需求如下:

c5599f8edf1322cfd008e877a4f74a25.png

实现代码完成下面的测试用例,要求和预期输出结果一致

#include <iostream>
#include <string>
#include <fstream>
#include <list>
using namespace std;struct Record
{static constexpr int FIRST_NAME_LEN = 10;static constexpr int SECOND_NAME_LEN = 10;static constexpr int SOCIAL_SECURITY_LEN = 9;static constexpr int DEP_ID_LEN = 9;public:Record(void);friend istream& operator>>(istream& in, Record& record);friend ostream& operator<<(ostream& out, const Record& record);ofstream& WriteToBinaryFile(ofstream& out) const;ifstream& Record::ReadFromBinaryFile(ifstream& fin);void WriteToOstream(ostream& os) const;
public:char m_firstName[FIRST_NAME_LEN];char m_secondName[SECOND_NAME_LEN];char m_socialSecurity[SOCIAL_SECURITY_LEN];char m_departmentID[DEP_ID_LEN];int m_years;int m_salary;int m_averageSalary;int m_averageYears;
};
bool ReadTextEmployee(const string& textFileName, list<Record>& listEmployee);
void PrintAllEmployee(const list<Record>& listEmployee);
bool WriteEmployeeToBinaryFile(const list<Record>& listEmployee, const string& textFileName);
bool ReadBinaryEmployee(const string& fileName, list<Record>& listEmployee);
bool WriteEmployeeToTextFile(const list<Record>& listEmployee, const string& textFileName);
void CalculateAverage(list<Record>& listEmployee);
void PrintAllEmployeeWithAverage(const list<Record>& listEmployee);int main(int arcg, char** argv)
{list<Record> listEmployee;cout<<"ReadTextEmployee from employee.in"<<endl;if (!ReadTextEmployee("employee.in", listEmployee)){return -1;}PrintAllEmployee(listEmployee);cout<<"WriteEmployeeToBinaryFile to employee.binaryn"<<endl;WriteEmployeeToBinaryFile(listEmployee, "employee.binary");listEmployee.clear();cout<<"ReadBinaryEmployee from employee.binary"<<endl;ReadBinaryEmployee("employee.binary", listEmployee);PrintAllEmployee(listEmployee);CalculateAverage(listEmployee);PrintAllEmployeeWithAverage(listEmployee);WriteEmployeeToTextFile(listEmployee, "employee.out");return 0;
}

预期输出结果:

338232babc911304cb24cc86d74b4c4a.png

employee.ini

Bill Tarpon     182460678  789   8   30600
Fred Caldron    456905434  789   10  40700
Sally Bender    203932239  790   8   50000
David Kemp      568903493  790    9  60000

402bb025345e053e1fae10ddc05e7f5d.png

来吧!

C++中级程序员教程

http://www.wooajung.com/news/33731.html

相关文章:

  • 汽车租赁网站怎么做网络营销推广专员
  • 科技备案企业网站线上推广方案
  • 东莞网站推广渠道有哪些百度贴吧人工客服
  • 网店代运营违法吗seo排名点击器
  • 网站开发工具 哪个好代推广app下载
  • 建设项目水资源论证网站360收录提交
  • 北京服饰网站建设老王搜索引擎入口
  • 企业网站制作找什么人百度指数关键词
  • 网站虚拟交易技术怎么做利用搜索引擎营销成功的案例
  • 坂田网站的建设永久免费linux服务器
  • 北京互联网公司开发的网站微营销是什么
  • 无锡做网站多少钱网络营销环境分析
  • 网站建设网站公司品牌运营中心
  • 建设一个网站要钱吗内容营销案例
  • 网站数据库在空间吗免费的自助建站
  • tp 网站建设源码seo页面优化的方法
  • 买权重网站网站优化资源
  • 搜了网的免费b2b网站口碑营销的例子
  • 网站建设的总体设计思想app推广方案范例
  • wordpress个性登录seo快排
  • 堆龙德庆网站建设拍照搜索百度识图
  • 建设银行网站最近打不开吗优化软件刷排名seo
  • 做旅游网站怎么样5188关键词挖掘工具
  • 武汉网站建设设计百度seo是什么意思呢
  • 企业被网站骗做会员站长工具seo综合查询问题
  • 辽宁建设工程信息网官网新网站是哪个网站推广联盟
  • 易企秀网页制作教程洛阳seo博客
  • 自己如何建立网站免费外链发布
  • 网站广告销售怎么做合肥做网站公司哪家好
  • 珠海响应式网站建设价格网站换了域名怎么查