搜索资源列表
c++123
- #include<iostream> using namespace std class ABC { private: double i,j public: ABC(int x,int y):i(x),j(y) {} ABC() {} double add() { return i+j } double jian() { return i-j } double cheng() { ret
C++程序设计语言实验三
- 实验三:C++编程入门 一、实验内容 1. 类模版。 2. 运算符重载。 3. 友元。 4. 继承。 二、实验题目 1, 设计一个类SavingsAccount,定义一个静态数据成员记录存款的年利率(rate),该类的每个成员都包含一个私有的数据成员balance,表示该成员当前的存款数额。提供一个成员函数CalMonthlyInterest(),用以计算月利息(用balance乘以rate再除以12),并将这个月利息加入balance中。提供一个静态成员函数ModifyRate(
10
- 实验目的:熟悉继承的概念,掌握定义并使用基类与派生类的方法 实验内容: (1) 程序清单:10.1 -#include <iostream.h> #include <iomanip.h> class Time { public: Time(int h = 0, int m = 0, int s = 0) { hrs = h, mins = m, secs = s } ~Time
11
- 实验目的:熟悉虚函数及多态的产生 实验内容: (1)实验清单11.1-#include <iostream.h> #include <iomanip.h> class Time { public: Time(int h, int m, int s ) { hrs = h, mins = m, secs = s } ~Time () { } void sho
goods
- #include <iostream> #include <string> using namespace std class Goods {public: Goods(char *GoodsNum,string n,double p,int a) { strcpy(GoodsNumber,GoodsNum) GoodsName=n GoodsPrice=p GoodsAmount=a }
edatest
- 一个在MFC中使用IOStream IO实现高效文件流操作的小例子-a sample of highly efficient document IO access in MFC
BANK
- 银行卡管理系统开户、存款、取款、修改密码、重置密码、销户 c-#include<iostream> #include<cstring> using namespace std class count { public: friend class ATM count (char Name[],char Num[],float Money,char Password[]) //初始化
