Add files via upload
This commit is contained in:
313
dingtuipiao.cpp
Normal file
313
dingtuipiao.cpp
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<fstream>
|
||||||
|
#include<sm.h>
|
||||||
|
#include<cmath>
|
||||||
|
using namespace std;
|
||||||
|
void dingtuipiaoxitong()
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD>붩<EFBFBD><EFBFBD>Ʊϵͳ***" << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD>" << endl;
|
||||||
|
cout << "1.<2E><>Ʊ" << endl;
|
||||||
|
cout << "2.<2E><>Ʊ" << endl;
|
||||||
|
cout << "3.<2E>˳<EFBFBD>ϵͳ" << endl;
|
||||||
|
int xuanze;
|
||||||
|
cin >> xuanze;
|
||||||
|
if (xuanze >= 1 && xuanze <= 3)
|
||||||
|
{
|
||||||
|
switch (xuanze)
|
||||||
|
{
|
||||||
|
case 1:dingpiao();
|
||||||
|
case 2:tuipiao();
|
||||||
|
case 3:jinruxitong();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; }
|
||||||
|
}
|
||||||
|
void dingpiao()
|
||||||
|
{
|
||||||
|
int z1 ;
|
||||||
|
z1 = 0;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary|ios::in);
|
||||||
|
hangbanxinxi w;
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int lenk = ifile.tellg() / sizeof(w);
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
for (int i = 0; i < lenk; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&w, sizeof(w));
|
||||||
|
cout << i + 1 << "," << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << w.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << w.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << w.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << w.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << w.didachengshi << "<EFBFBD>ִﺽվ¥" << w.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>" << w.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>" << w.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << w.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>" << w.jingjicangshu << endl;
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
int q;//<2F><><EFBFBD>溽<EFBFBD><E6BABD><EFBFBD><EFBFBD>
|
||||||
|
int i;
|
||||||
|
int z; z = 0;//<2F><><EFBFBD>Һ<EFBFBD><D2BA><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||||
|
int z2; z2 = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>
|
||||||
|
int riqi;//<2F><>ʼ<EFBFBD><CABC><EFBFBD>ڵ<EFBFBD>ת<EFBFBD><D7AA>
|
||||||
|
hangbanxinxi a;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary|ios::in);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
cout << len<<endl;
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
cout << n << endl;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> q;
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(a) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
if (a.hangbanhao == q) { z = 1; break; }
|
||||||
|
|
||||||
|
}
|
||||||
|
if (z != 1) { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; }
|
||||||
|
else { break; }
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
if (z == 1)
|
||||||
|
{
|
||||||
|
|
||||||
|
cout << "<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << q << "<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>" << a.banqi << endl;
|
||||||
|
//<2F><>ʼƥ<CABC><C6A5><EFBFBD><EFBFBD><EFBFBD>ںͰ<DABA><CDB0><EFBFBD>
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>" << "<EFBFBD><EFBFBD>ʽΪxxxx<EFBFBD><EFBFBD>xx<EFBFBD><EFBFBD>xx<EFBFBD>գ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><EFBFBD>ɣ<EFBFBD>" << endl;
|
||||||
|
cin >> riqi;
|
||||||
|
int year, month, day;
|
||||||
|
year = riqi / 10000;
|
||||||
|
month = riqi / 100 - year;
|
||||||
|
day = riqi % 100;
|
||||||
|
if (month == 1 || month == 2)
|
||||||
|
{
|
||||||
|
month += 12;
|
||||||
|
--year;
|
||||||
|
}
|
||||||
|
int weekday;
|
||||||
|
weekday = (day + 2 * month + 3 * (month + 1) / 5 + year + year / 4 - year / 100 + year / 400 + 1) % 7;//<2F><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ɭ<EFBFBD><C9AD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
month -= 12;
|
||||||
|
++year;
|
||||||
|
int p = 0;//<2F><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
int cun;//<2F><>a.<2E><><EFBFBD>ڵĴ洢
|
||||||
|
cun = a.banqi;
|
||||||
|
while (cun != 0)
|
||||||
|
{
|
||||||
|
cun = cun / 10;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
cun = a.banqi;
|
||||||
|
for (int k = 0; k < p; k++)
|
||||||
|
{
|
||||||
|
int bencixingqishu;
|
||||||
|
int xiaci = cun;
|
||||||
|
bencixingqishu = xiaci;
|
||||||
|
if (cun / 10 != 0) { bencixingqishu = cun / pow(10, p - (k + 1)); xiaci = cun - bencixingqishu * pow(10, p - (k + 1)); }//<2F>Ѱ<EFBFBD><D1B0><EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
||||||
|
else { bencixingqishu = cun % 10; }
|
||||||
|
if ((weekday + 1) == bencixingqishu)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD>Ѿ<EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << riqi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << q << "<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>";
|
||||||
|
z1 = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (z1 == 0) { cout << "û<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl; }
|
||||||
|
|
||||||
|
else { break; }
|
||||||
|
|
||||||
|
}
|
||||||
|
dingdanmingxixinxi b;
|
||||||
|
dingdanmingxixinxi c;
|
||||||
|
int toudengcangshuliang = 0;
|
||||||
|
int gongwucangshuliang = 0;
|
||||||
|
int jingjicangshuliang = 0;
|
||||||
|
ofstream ofile;
|
||||||
|
ofile.open("mayuan.dingdan.txt", ios::out | ios::binary|ios::app);
|
||||||
|
ofile.close();
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.dingdan.txt", ios::in | ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len1 = ifile.tellg();
|
||||||
|
int n1 = len1 / sizeof(dingdanmingxixinxi);
|
||||||
|
for (int k = 0; k < n1; k++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(dingdanmingxixinxi) * k);
|
||||||
|
ifile.read((char*)&b, sizeof(dingdanmingxixinxi));
|
||||||
|
|
||||||
|
if (b.zuoweidengji == "toudengcang")
|
||||||
|
{
|
||||||
|
toudengcangshuliang += 1;
|
||||||
|
}
|
||||||
|
if (b.zuoweidengji == "gongwucang")
|
||||||
|
{
|
||||||
|
gongwucangshuliang += 1;
|
||||||
|
}
|
||||||
|
if (b.zuoweidengji == "jingjicang")
|
||||||
|
{
|
||||||
|
jingjicangshuliang += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
cout << "<EFBFBD>Ѿ<EFBFBD>Ϊ<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << q << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << riqi << "<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>" << a.toudengcangshu << " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>" << a.gongwucangshu << " <20><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>Ϊ<EFBFBD><CEAA>" << a.jingjicangshu << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ȳ<EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << a.toudengcangshu - toudengcangshuliang << " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << a.gongwucangshu - gongwucangshuliang << " <20><><EFBFBD>ò<EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << a.jingjicangshu - jingjicangshuliang << endl;
|
||||||
|
if (a.toudengcangshu - toudengcangshuliang != 0 && a.gongwucangshu - gongwucangshuliang != 0 && a.jingjicangshu - jingjicangshuliang != 0)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>" << endl;
|
||||||
|
cout << "1.ͷ<>Ȳ<EFBFBD>" << endl;
|
||||||
|
cout << "2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "3.<2E><><EFBFBD>ò<EFBFBD>" << endl;
|
||||||
|
int r;
|
||||||
|
cin >> r;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
switch (r)
|
||||||
|
{
|
||||||
|
case 1:if (a.toudengcangshu - toudengcangshuliang == 0) { cout << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>" << endl; break; }
|
||||||
|
else { z2 = 1; c.zuoweidengji = "toudengcang"; break; }
|
||||||
|
case 2:if (a.gongwucangshu - toudengcangshuliang == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>" << endl; break; }
|
||||||
|
else { z2 = 1; c.zuoweidengji = "gongwucang"; break; }
|
||||||
|
case 3:if (a.jingjicangshu - jingjicangshuliang == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>" << endl; break; }
|
||||||
|
else { z2 = 1; c.zuoweidengji = "jingjicang"; break; }
|
||||||
|
}
|
||||||
|
if (z2 == 1) { break; }
|
||||||
|
}
|
||||||
|
if (z2 == 1)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD>Ʊ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> c.chengkexingming;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> c.dianhuahaoma;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> c.shenfenzhenghao;
|
||||||
|
c.chufariqi = riqi;
|
||||||
|
c.hangbanhao = q;
|
||||||
|
ifile.open("mayuan.dingdan.txt", ios::in | ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len1 = ifile.tellg();
|
||||||
|
int n1 = len1 / sizeof(dingdanmingxixinxi);
|
||||||
|
c.dingdanhao = 220 + n1;
|
||||||
|
ifile.close();
|
||||||
|
ofile.open("mayuan.dingdan.txt", ios::app | ios::binary |ios::out);
|
||||||
|
ofile.write((char*)&c, sizeof(c));
|
||||||
|
ofile.close();
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룡" << endl;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>" << c.dingdanhao;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD>ܱ<EFBFBD>Ǹ" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << q << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << riqi << "<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD>" << "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dingtuipiaoxitong();
|
||||||
|
|
||||||
|
}
|
||||||
|
void tuipiao()
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>" << endl;
|
||||||
|
long long int shenfenzheng;
|
||||||
|
cin >> shenfenzheng;
|
||||||
|
int n = 0;//<2F><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
dingdanmingxixinxi a;
|
||||||
|
dingdanmingxixinxi b;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.dingdan.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len2 = ifile.tellg();
|
||||||
|
int u = len2 / sizeof(dingdanmingxixinxi);
|
||||||
|
ofstream ofile;
|
||||||
|
ofile.open("mayuan.dingdan1.txt", ios::binary | ios::out|ios::app);
|
||||||
|
for (int i = 0; i < u; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(a) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
if (shenfenzheng == a.shenfenzhenghao)
|
||||||
|
{
|
||||||
|
cout << "dingdanhao<EFBFBD><EFBFBD>" << a.dingdanhao;
|
||||||
|
b.dingdanhao = a.dingdanhao;
|
||||||
|
b.hangbanhao = a.hangbanhao;
|
||||||
|
b.chufariqi = a.chufariqi;
|
||||||
|
b.zuoweidengji = a.zuoweidengji;
|
||||||
|
b.chengkexingming = a.chengkexingming;
|
||||||
|
b.shenfenzhenghao = a.shenfenzhenghao;
|
||||||
|
b.dianhuahaoma = a.dianhuahaoma;
|
||||||
|
ofile.write((char*)&b, sizeof(b));
|
||||||
|
++n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
if (n == 0) { cout << "δ<EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>Ϊ" << shenfenzheng << "<EFBFBD>ij˿<EFBFBD>" << endl; }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>Ϊ" << shenfenzheng << "<EFBFBD>ij˿<EFBFBD>" << endl;
|
||||||
|
ifile.open("mayuan.dindan1.txt", ios::binary | ios::in);
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(a) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
cout << i + 1 << "." << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:" << a.dingdanhao << "<EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:" << a.chengkexingming << "<EFBFBD>绰<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:" << a.dianhuahaoma << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:" << a.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:" << a.chufariqi << "<EFBFBD><EFBFBD>λ<EFBFBD>ȼ<EFBFBD>Ϊ:" << a.zuoweidengji << endl;
|
||||||
|
}
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>Ʊ<EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
int dingdanhao;
|
||||||
|
int y = 0;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
cin >> dingdanhao;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(a) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
if (dingdanhao == a.dingdanhao)
|
||||||
|
{
|
||||||
|
y =1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (y == 0) { cout << "δ<EFBFBD>ҵ<EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl; }
|
||||||
|
else { break; }
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ifile.open("mayuan.dingdan1.txt", ios::binary | ios::trunc);
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
if (y == 1)
|
||||||
|
{
|
||||||
|
dingdanmingxixinxi a;
|
||||||
|
ifile.open("mayuan.dingdan.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.dingdan2.txt", ios::trunc | ios::binary);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.dingdan2.txt", ios::trunc | ios::out);
|
||||||
|
for (int i = 0; i < u; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(dingdanmingxixinxi) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
if (a.shenfenzhenghao != shenfenzheng && a.dingdanhao != dingdanhao)
|
||||||
|
{
|
||||||
|
ofile.write((char*)&a, sizeof(a));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ifile.open("mayuan.dingdan2.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.dingdan.txt", ios::trunc | ios::binary);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.dingdan.txt", ios::binary | ios::out);
|
||||||
|
for (int i = 0; i < u - 1; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(a) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(a));
|
||||||
|
ofile.write((char*)&a, sizeof(a));
|
||||||
|
}
|
||||||
|
cout << "<EFBFBD><EFBFBD>Ʊ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.dingdan2.txt", ios::binary | ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
dingtuipiaoxitong();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
393
hangban.cpp
Normal file
393
hangban.cpp
Normal file
@@ -0,0 +1,393 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<sm.h>
|
||||||
|
#include<fstream>
|
||||||
|
using namespace std;
|
||||||
|
void hangbanguanlixitong()
|
||||||
|
{
|
||||||
|
|
||||||
|
int xuanzegongneng;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD>ܣ<EFBFBD>" << endl;
|
||||||
|
cout << "1.<2E><><EFBFBD>Ӻ<EFBFBD><D3BA><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "2.<2E><>ʾ<EFBFBD><CABE><EFBFBD>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "3.<2E><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "4.<2E>ĺ<DEB8><C4BA><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "5.ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "6.<2E>˳<EFBFBD>ϵͳ" << endl;
|
||||||
|
cin >> xuanzegongneng;
|
||||||
|
switch (xuanzegongneng)
|
||||||
|
{
|
||||||
|
case 1:tianjiahangbangongneng(); break;
|
||||||
|
case 2:xianshisuoyouhangbanxinxigongneng(); break;
|
||||||
|
case 3:chaxunhangbanxinxigongneng(); break;
|
||||||
|
case 4:xiugaihangbanxinxigongneng(); break;
|
||||||
|
case 5:shanchuhangbanxinxigongneng(); break;
|
||||||
|
case 6:jinruxitong(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void tianjiahangbangongneng()
|
||||||
|
{
|
||||||
|
hangbanxinxi a;
|
||||||
|
hangbanxinxi b;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>a<EFBFBD>Աȶ<D4B1><C8B6><EFBFBD>
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.hangbanhao;
|
||||||
|
ofstream ofile;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary | ios::in);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(b);
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
int jiance = 0;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(b));
|
||||||
|
if (b.hangbanhao == a.hangbanhao) { jiance = 1; }
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
if (jiance == 0) { break; }
|
||||||
|
else { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><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;
|
||||||
|
cin >> a.hangkonggongsi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.banqi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.shifachengshi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.didachengshi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵִﺽվ¥" << endl;
|
||||||
|
cin >> a.didahangzhanlou;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.shijian;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.toudengcangshu;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.gongwucangshu;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ӵĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ľ<EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.jingjicangshu;
|
||||||
|
ofstream ofile;
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::binary | ios::app|ios::out);
|
||||||
|
ofile.write((char*)&a, sizeof(a));
|
||||||
|
ofile.close();
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
void xianshisuoyouhangbanxinxigongneng()
|
||||||
|
{
|
||||||
|
hangbanxinxi b;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(b);
|
||||||
|
if (n == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl; }
|
||||||
|
else {
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(b));
|
||||||
|
cout << i + 1 << "," << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << b.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.didachengshi << "<EFBFBD>ִﺽվ¥" << b.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>" << b.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>" << b.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>" << b.jingjicangshu << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
void xianshisuoyouhangbanxinxigongnen()
|
||||||
|
{
|
||||||
|
hangbanxinxi b;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(b);
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
cout << n << endl;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(b));
|
||||||
|
cout << i + 1 << "," << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << b.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.didachengshi << "<EFBFBD>ִﺽվ¥" << b.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>" << b.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>" << b.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << b.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>" << b.jingjicangshu << endl;
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
}
|
||||||
|
void chaxunhangbanxinxigongneng()
|
||||||
|
{
|
||||||
|
int xuanze;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ѯ<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl;
|
||||||
|
cout << "1.<2E><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD><EFBFBD>Ų<EFBFBD>ѯ" << endl;
|
||||||
|
cout << "2.<2E><><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD>ѯ" << endl;
|
||||||
|
cin >> xuanze;
|
||||||
|
switch (xuanze)
|
||||||
|
{
|
||||||
|
case 1:anzhaohangbanhaochaxun();
|
||||||
|
case 2:anzhaoshifachengshichaxun();
|
||||||
|
}
|
||||||
|
hangbanguanlixitong();
|
||||||
|
|
||||||
|
}
|
||||||
|
void anzhaohangbanhaochaxun()
|
||||||
|
{
|
||||||
|
hangbanxinxi a;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ѯ<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.hangbanhao;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
hangbanxinxi b;
|
||||||
|
int c = 0;//<2F>ж<EFBFBD><D0B6><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>Ϣ<EFBFBD><CFA2>
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(hangbanxinxi));
|
||||||
|
if (a.hangbanhao == b.hangbanhao)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD>Ѳ<EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD>ຽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << b.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.didachengshi << "<EFBFBD>ִﺽվ¥Ϊ" << b.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>Ϊ" << b.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.jingjicangshu << endl;
|
||||||
|
c = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ"; }
|
||||||
|
ifile.close();
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
void anzhaoshifachengshichaxun()
|
||||||
|
{
|
||||||
|
hangbanxinxi a;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ѯ<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.shifachengshi;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
hangbanxinxi b;
|
||||||
|
int c = 0;
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(hangbanxinxi));
|
||||||
|
if (a.shifachengshi == b.shifachengshi)
|
||||||
|
{
|
||||||
|
cout << "<EFBFBD>Ѳ<EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD>ຽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << b.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.didachengshi << "<EFBFBD>ִﺽվ¥Ϊ" << b.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>Ϊ" << b.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.jingjicangshu << endl;
|
||||||
|
c = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c == 0) { cout << "<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ"; }
|
||||||
|
ifile.close();
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
void xiugaihangbanxinxigongneng()
|
||||||
|
{
|
||||||
|
hangbanxinxi a;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.hangbanhao;
|
||||||
|
hangbanxinxi b;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
int c; c = 0;//<2F>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
ifile.seekg(0, ios::beg);
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.read((char*)&b, sizeof(hangbanxinxi));
|
||||||
|
if (b.hangbanhao == a.hangbanhao)
|
||||||
|
{
|
||||||
|
c = 1;
|
||||||
|
cout << "<EFBFBD>Ѳ<EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD>ú<EFBFBD><EFBFBD>ຽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.hangbanhao << "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>˾" << b.hangkonggongsi << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.banqi << "ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.shifachengshi << "<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.didachengshi << "<EFBFBD>ִﺽվ¥Ϊ" << b.didahangzhanlou << "ʱ<EFBFBD><EFBFBD>Ϊ" << b.shijian << "ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.toudengcangshu << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.gongwucangshu << "<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ϊ" << b.jingjicangshu << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
if (c == 0) { cout << "δ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD>" << endl; }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hangbanxinxi c;
|
||||||
|
hangbanxinxi d;
|
||||||
|
int s = a.hangbanhao;
|
||||||
|
int i;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * i);
|
||||||
|
ifile.read((char*)&c, sizeof(hangbanxinxi));
|
||||||
|
if (s == c.hangbanhao) { break; }
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofstream ofile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.zhongjie.txt", ios::binary | ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.zhongjie.txt", ios::binary | ios::out);
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * j);
|
||||||
|
ifile.read((char*)&c, sizeof(hangbanxinxi));
|
||||||
|
if (j != i)
|
||||||
|
{
|
||||||
|
d.hangbanhao = c.hangbanhao;
|
||||||
|
d.hangkonggongsi = c.hangkonggongsi;
|
||||||
|
d.banqi = c.banqi;
|
||||||
|
d.shifachengshi = c.shifachengshi;
|
||||||
|
d.didachengshi = c.didachengshi;
|
||||||
|
d.didahangzhanlou = c.didahangzhanlou;
|
||||||
|
d.shijian = c.shijian;
|
||||||
|
d.toudengcangshu = c.toudengcangshu;
|
||||||
|
d.jingjicangshu = c.jingjicangshu;
|
||||||
|
d.gongwucangshu = c.gongwucangshu;
|
||||||
|
ofile.write((char*)&d, sizeof(hangbanxinxi));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ifile.open("mayuan.zhongjie.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::binary | ios::out | ios::app);
|
||||||
|
for (int k = 0; k < n - 1; k++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * k);
|
||||||
|
ifile.read((char*)&d, sizeof(d));
|
||||||
|
c.hangbanhao = d.hangbanhao;
|
||||||
|
c.hangkonggongsi = d.hangkonggongsi;
|
||||||
|
c.banqi = d.banqi;
|
||||||
|
c.shifachengshi = d.shifachengshi;
|
||||||
|
c.didachengshi = d.didachengshi;
|
||||||
|
c.didahangzhanlou = d.didahangzhanlou;
|
||||||
|
c.shijian =d.shijian;
|
||||||
|
c.toudengcangshu = d.toudengcangshu;
|
||||||
|
c.jingjicangshu = d.jingjicangshu;
|
||||||
|
c.gongwucangshu = d.gongwucangshu;
|
||||||
|
ofile.write((char*)&c, sizeof(c));
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.zhongjie.txt", ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" << endl;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD>չ<EFBFBD>˾" << endl;
|
||||||
|
cin >> a.hangkonggongsi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.banqi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.shifachengshi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.didachengshi;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵִﺽվ¥" << endl;
|
||||||
|
cin >> a.didahangzhanlou;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.shijian;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ȳ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.toudengcangshu;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.gongwucangshu;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ľ<EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
cin >> a.jingjicangshu;
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::binary | ios::out|ios::app);
|
||||||
|
ofile.write((char*)&a, sizeof(hangbanxinxi));
|
||||||
|
ofile.close();
|
||||||
|
cout << "<EFBFBD>ijɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>鿴<EFBFBD><EFBFBD>" << endl;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD>鿴<EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0" << endl;
|
||||||
|
int xuanze;
|
||||||
|
cin >> xuanze;
|
||||||
|
if (xuanze == 1) { xianshisuoyouhangbanxinxigongneng(); }
|
||||||
|
else { ; }
|
||||||
|
}
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
void shanchuhangbanxinxigongneng()
|
||||||
|
{
|
||||||
|
hangbanxinxi a;
|
||||||
|
hangbanxinxi b;
|
||||||
|
cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
int s;
|
||||||
|
cin >> s;
|
||||||
|
int z; z = 0;
|
||||||
|
int i;
|
||||||
|
ifstream ifile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ifile.seekg(0, ios::end);
|
||||||
|
int len = ifile.tellg();
|
||||||
|
int n = len / sizeof(hangbanxinxi);
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * i);
|
||||||
|
ifile.read((char*)&a, sizeof(hangbanxinxi));
|
||||||
|
if (s == a.hangbanhao) { z = 1; break; }
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
if (z == 0) { cout << "δ<EFBFBD>ҵ<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD>" << endl; }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ifstream ifile;
|
||||||
|
ofstream ofile;
|
||||||
|
ifile.open("mayuan.hangbanxinxi.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.zhongjie.txt",ios::binary| ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.zhongjie.txt", ios::binary | ios::out);
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * j);
|
||||||
|
ifile.read((char*)&a, sizeof(hangbanxinxi));
|
||||||
|
if (j != i)
|
||||||
|
{
|
||||||
|
b.hangbanhao = a.hangbanhao;
|
||||||
|
b.hangkonggongsi = a.hangkonggongsi;
|
||||||
|
b.banqi = a.banqi;
|
||||||
|
b.shifachengshi = a.shifachengshi;
|
||||||
|
b.didachengshi = a.didachengshi;
|
||||||
|
b.didahangzhanlou = a.didahangzhanlou;
|
||||||
|
b.shijian = a.shijian;
|
||||||
|
b.toudengcangshu = a.toudengcangshu;
|
||||||
|
b.jingjicangshu = a.jingjicangshu;
|
||||||
|
b.gongwucangshu = a.gongwucangshu;
|
||||||
|
ofile.write((char*)&b, sizeof(hangbanxinxi));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ifile.open("mayuan.zhongjie.txt", ios::binary);
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.hangbanxinxi.txt", ios::binary | ios::out|ios::app);
|
||||||
|
for (int k = 0; k < n - 1; k++)
|
||||||
|
{
|
||||||
|
ifile.seekg(sizeof(hangbanxinxi) * k);
|
||||||
|
ifile.read((char*)&b, sizeof(b));
|
||||||
|
a.hangbanhao = b.hangbanhao;
|
||||||
|
a.hangkonggongsi = b.hangkonggongsi;
|
||||||
|
a.banqi = b.banqi;
|
||||||
|
a.shifachengshi = b.shifachengshi;
|
||||||
|
a.didachengshi = b.didachengshi;
|
||||||
|
a.didahangzhanlou = b.didahangzhanlou;
|
||||||
|
a.shijian = b.shijian;
|
||||||
|
a.toudengcangshu = b.toudengcangshu;
|
||||||
|
a.jingjicangshu = b.jingjicangshu;
|
||||||
|
a.gongwucangshu = b.gongwucangshu;
|
||||||
|
ofile.write((char*)&a, sizeof(a));
|
||||||
|
}
|
||||||
|
ifile.close();
|
||||||
|
ofile.close();
|
||||||
|
ofile.open("mayuan.zhongjie.txt", ios::trunc);
|
||||||
|
ofile.close();
|
||||||
|
cout << "ɾ<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>" << endl;
|
||||||
|
}
|
||||||
|
hangbanguanlixitong();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
27
jinruxitong.cpp
Normal file
27
jinruxitong.cpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<fstream>
|
||||||
|
#include<sm.h>
|
||||||
|
#include<cmath>
|
||||||
|
using namespace std;
|
||||||
|
void jinruxitong()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
int xuanze;
|
||||||
|
cout << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD> " << endl;
|
||||||
|
cout << "1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ " << endl;
|
||||||
|
cout << "2.<2E><><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ϵͳ " << endl;
|
||||||
|
cout << "3.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ϵͳ" << endl;
|
||||||
|
cout << "4.<2E>˳<EFBFBD>" << endl;
|
||||||
|
cin >> xuanze;
|
||||||
|
switch (xuanze)
|
||||||
|
{
|
||||||
|
case 1:hangbanguanlixitong(); break;
|
||||||
|
case 2:dingtuipiaoxitong(); break;
|
||||||
|
case 3:shoupiaoguanlixitong(); break;
|
||||||
|
case 4: exit; break;
|
||||||
|
}
|
||||||
|
if (xuanze >= 1 && xuanze <= 4)break;
|
||||||
|
else cout << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-4<>Խ<EFBFBD><D4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ϵͳ<CFB5><CDB3>" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
52
sm.h
Normal file
52
sm.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
void jinruxitong();
|
||||||
|
void hangbanguanlixitong();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ
|
||||||
|
void dingtuipiaoxitong();//<2F><><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ϵͳ
|
||||||
|
void shoupiaoguanlixitong();//ͳ<><CDB3><EFBFBD><EFBFBD>Ʊϵͳ/*ϵͳ<CFB5><CDB3>*/
|
||||||
|
void tianjiahangbangongneng();//<2F><><EFBFBD>Ӻ<EFBFBD><D3BA><EFBFBD><E0B9A6>
|
||||||
|
void xianshisuoyouhangbanxinxigongneng();//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD><D0B0><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
void xianshisuoyouhangbanxinxigongnen();//fuben
|
||||||
|
void chaxunhangbanxinxigongneng();//<2F><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
void xiugaihangbanxinxigongneng();//<2F>ĺ<DEB8><C4BA><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||||
|
void shanchuhangbanxinxigongneng();//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
void anzhaohangbanhaochaxun();
|
||||||
|
void anzhaoshifachengshichaxun();
|
||||||
|
void dingpiao();
|
||||||
|
void tuipiao();
|
||||||
|
void xianshisuoyoudingdanxinxi();
|
||||||
|
class hangbanxinxi
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
long long int hangbanhao;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
string hangkonggongsi;//<2F><><EFBFBD>չ<EFBFBD>˾
|
||||||
|
long long int banqi;//<2F><><EFBFBD><EFBFBD>
|
||||||
|
string shifachengshi;//ʼ<><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
string didachengshi;//<2F>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
string didahangzhanlou;//<2F>ִﺽվ¥
|
||||||
|
long long int shijian;//ʱ<><CAB1>
|
||||||
|
long long int toudengcangshu;//ͷ<>Ȳ<EFBFBD><C8B2><EFBFBD>
|
||||||
|
long int gongwucangshu;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
long int jingjicangshu;//<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
||||||
|
};
|
||||||
|
class dingdanxinxi
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
long long int dingdanhao;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
string kehuxingming;//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
long long int dianhuahaoma;//<2F>绰<EFBFBD><E7BBB0><EFBFBD><EFBFBD>
|
||||||
|
long long int zongjine;//<2F>ܽ<EFBFBD><DCBD><EFBFBD>
|
||||||
|
long long int riqi;//<2F><><EFBFBD><EFBFBD>
|
||||||
|
};
|
||||||
|
class dingdanmingxixinxi
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
long long int dingdanhao;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
long long int hangbanhao;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
long long int chufariqi;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
string zuoweidengji;//<2F><>λ<EFBFBD>ȼ<EFBFBD>
|
||||||
|
string chengkexingming;//<2F>˿<EFBFBD><CBBF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
long long int shenfenzhenghao;//<2F><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>
|
||||||
|
long long int dianhuahaoma;//<2F>绰<EFBFBD><E7BBB0><EFBFBD><EFBFBD>
|
||||||
|
};
|
||||||
|
|
||||||
45
tongji.cpp
Normal file
45
tongji.cpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#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();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user