c++自己实现的一个程序

#include "iostream.h"
#include "string.h"
class BankList
{
private:
 char Name[20];
 char Account[20];
 float Deposits;
public:
 void banklist(char *Name,char *Account,float Deposits);
 void show(char *Name,char *Account,float Deposits);
 void Save(char *Account,float Deposits);
 void Money(float Deposits);
};
void BankList::banklist(char *Name,char *Account,float Deposits)
{
 Name=NULL;
 Account=NULL;
 Deposits=NULL;
}
void BankList::show(char *Name,char *Account,float Deposits)
{
 cout<<"The UserName Is:"<<Name<<endl;
 cout<<"The User's Account Is:"<<Account<<endl;
 cout<<"The User's Deposits:"<<Deposits<<endl;
}
void BankList::Save(char *Account,float Deposits)
 float SaveDeposits;
  cout<<"please input HowMuch money could you want to save\n"<<endl;
  cin>>SaveDeposits;
  cout<<"you have SaveDeposits  "<<SaveDeposits<<"  money?"<<endl;
  Deposits=SaveDeposits+Deposits;
  cout<<"Now the money on your Accout Is:"<<Deposits<<endl;
 

}
void BankList::Money(float Deposits)
{
}
int main()
{
 BankList banklist;
 banklist.show("James","12345",100.00);
 banklist.Save("12345",100);
 return 0;
}

你可能感兴趣的:(职场,休闲,C++入门)