c++ 银行管理系统

资源:
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
class Function;
class User
{
public:
    void get( );
    friend class Function;
    void print();
    void PassWord();
    void SaveFile(User &);
    vector StrFunction;
    User(){}
    User(int A,string N,int F,string I,string Ad,int T):Accout(A),Name(N),Fmoney(F),ID(I),Address(Ad),Telephone(T){}
private:
  int Accout;//账号
  string Name;//姓名
  int Fmoney;
  string ID;
  string Address;
  int Telephone;
  char  Pword1[9];
  char Pword2[9];
};
class Function
{
public:
    void Saving(User &);
    void Drawing(User &);
    void Balance(User &);
    void Record(User &);
private:
    int  SaveAndDrawMoney;


};
void Function::Saving(User &u)
{
 system("cls");
 cout<<"\n\n\n\t\t*********************************************\n"<>SaveAndDrawMoney;
 u.Fmoney+=SaveAndDrawMoney;
 strstream ss;//输入输出字符串类
 string  str2;
 ss<>str2;
 str1=str1+str2;
 u.StrFunction.push_back(str1);
 cout<<"\n\n\t\t操作成功,单击任何键返回主菜单!";
 getch();
}
void Function::Drawing(User &u)
{
  system("cls");
  cout<<"\n\n\n\t\t*********************************************\n"<>SaveAndDrawMoney;
    Money=u.Fmoney -SaveAndDrawMoney;
   if(Money>=0)
  {
     system("cls");
    cout<<"\n\n\n\t\t正在出炒,请稍等!"<>str2;
    str=str+str2;
    u.StrFunction.push_back(str);
    break;
  }
  else
  {
      k++;
      if(k>=3)
      {
      system("cls");
      cerr<<"\n\n\n\t\t很抱歉,你重复输入错误多次"<::iterator  iter,iend;
    iter=u.StrFunction.begin();
    for(iter;iter!=u.StrFunction.end();iter++)
        cout<<"\n\t\t"<<*iter<>Accout;
   cout<<"\n\t\t姓名:";
   cin>>Name;
   cout<<"\n\t\t开户金额:";
   cin>>Fmoney;
   cout<<"\n\t\t身份证号:";
   cin>>ID;
   cout<<"\n\t\t地址:";
   cin>>Address;
   cout<<"\n\t\t联系电话:";
   cin>>Telephone;
   PassWord();
   cout<<"\n\t\t*********************************************\n"<>x;
         if(x=='1')
         {
            u.get();
         }
         else
         {
             Sign();
             exit(0);
         }
         return 0;
}
char menu()
{
  int k=0;
  char a[3],c,i;
    system("cls");
    cout<<"\n\n\n\t\t                主菜单          \n\n" ;
    cout<<"\t\t*********************************************\n"
        <<"\t\t*                                           *\n"
        <<"\t\t*                                           *\n"
        <<"\t\t*     操作方式:                             *\n"
        <<"\t\t*                                           *\n"
        <<"\t\t*             1.存款       2.取款           *\n"
        <<"\t\t*                                           *\n"
        <<"\t\t*             3.查询余额   4.查询历史记录   *\n"
        <<"\t\t*                                           *\n"
        <<"\t\t*             5.用户信息   6.保存并退出     *\n"
        <<"\t\t*********************************************\n"<>a;
        if(strlen(a)==1)
        {
            for(i='1';i<='6';i++)
            {  c=i;
            if(c==a[0]) return c;
            }
        }
        else
        {
            system("cls");
        cerr<<"\n\n\n\t\t\t输入有误!\n"<=3)
        {
            system("cls");
          cerr<<"\n\n\n\t\t对不起,你三次输入不正确\n"< FunctionUser;
  custom(u);
  Choose(u,F);
}

你可能感兴趣的:(c++学习笔记)