cout<<\│\││││
\\\
\│\
} biaowei(); line();
cout<<\销售经理:\打印销售经理数据 biaotou(); for(k=0;k biaozhong(); cout<<\ │ \ ││││ \\\ \│\ } biaowei(); line(); cout<<\销售员:\打印销售员数据 cout<<\┌────┬────┬────┬────┬────┬─── ────┐\ cout<<\│\职工号\│\姓名 \│\性别\│\年龄\│\工资\│\所属部门经理号\│\ for(k=0;k 16 cout<<\├────┼────┼────┼────┼────┼─ ──────┤\ cout<<\ │ \ │ \│\│ \ ││ \\│\ } cout<<\└────┴────┴────┴────┴────┴─── ────┘\ } void beifen()//备份文件的函数 { int k; fstream myfile;//定义文件流类的对象,对象名为file //文件的打开,以读、写方式打开 //若文件存在,则清除文件所有内容;若文件不存在,则创建新文件 myfile.open(\职工基本情况一览表.txt\myfile<<\ 职工基本情况一览表\myfile<<\┌────┬────┬────┬────┬────┬──line(); ──┬────┬───────┐\ myfile<<\│\序号\│\职工号 \│\职位\│\姓名\│\性别\│\年龄\│\工资\│\所属部门经理号\│\ //用<<输出 整型数据信息 至打开的文件 for(k=0;k 17 myfile<<\├────┼────┼────┼────┼────┼ ────┼────┼───────┤\ myfile<<\ │ \ │ \│\经理\│ \ │││ \\ \│\无\│\ } for(k=0;k myfile<<\├────┼────┼────┼────┼────┼ ────┼────┼───────┤\ myfile<<\ │ \ │ \│\销售经理\ │ \ │││ │ \ 无 \\\\│\ }
相关推荐: