45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
|
|
#include<iostream>
|
|||
|
|
#include<fstream>
|
|||
|
|
#include<sm.h>
|
|||
|
|
using namespace std;
|
|||
|
|
void shoupiaoguanlixitong()
|
|||
|
|
{
|
|||
|
|
while (true) {
|
|||
|
|
int xuanze;
|
|||
|
|
cout << "<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ" << endl;
|
|||
|
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD>ܣ<EFBFBD>" << endl;
|
|||
|
|
cout << "1.<2E><>ʾ<EFBFBD><CABE><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl;
|
|||
|
|
cout << "2.<2E>˳<EFBFBD>ϵͳ" << endl;
|
|||
|
|
cin >> xuanze;
|
|||
|
|
switch (xuanze)
|
|||
|
|
{
|
|||
|
|
case 1: {xianshisuoyoudingdanxinxi(); break; }
|
|||
|
|
case 2: {jinruxitong(); break; }
|
|||
|
|
}
|
|||
|
|
if (xuanze == 1 || xuanze == 2) break;
|
|||
|
|
else { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>2" << endl; }
|
|||
|
|
}
|
|||
|
|
jinruxitong();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void xianshisuoyoudingdanxinxi()
|
|||
|
|
{
|
|||
|
|
dingdanmingxixinxi b;
|
|||
|
|
ifstream ifile;
|
|||
|
|
ifile.open("mayuan.dingdan.txt", ios::binary);
|
|||
|
|
ifile.seekg(0, ios::end);
|
|||
|
|
int len2 = ifile.tellg();
|
|||
|
|
int n = len2 / sizeof(dingdanmingxixinxi);
|
|||
|
|
if (n == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl; }
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
for (int i = 0; i < n; i++)
|
|||
|
|
{
|
|||
|
|
ifile.seekg(sizeof(b) * i);
|
|||
|
|
ifile.read((char*)&b, sizeof(b));
|
|||
|
|
cout << i << "," << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.dingdanhao << " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.chufariqi << "<EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>" << b.zuoweidengji << " <20>˿<EFBFBD><CBBF><EFBFBD><EFBFBD><EFBFBD>" << b.chengkexingming << "<EFBFBD>绰<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.dianhuahaoma << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>" << b.shenfenzhenghao << endl;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
ifile.close();
|
|||
|
|
shoupiaoguanlixitong();
|
|||
|
|
}
|