- 博客(5)
- 收藏
- 关注
原创 8.16
#include #include using namespace std; template class Array{ public: Array(Type* d,int i) { data=d; n=i; } ~Array(){ } void sort(); //从大到小排序 void Reverse();
2015-07-09 16:05:59 267
原创 8.15
#include using namespace std; template T max(T a[],int n) //定义函数模板max { int i; T max=a[0]; for(i=1;i<n;i++) if(max<a[i]) max=a[i]; return max; } template T min(T a[],int n) //定义函数
2015-07-09 16:04:49 244
原创 7.12
#include using namespace std; class Container{ public: Container(double r=0,double i=0); friend Container operator+(const Container c1,const Container c2); void print() ; private:
2015-07-09 16:03:01 216
原创 7.11
#include #include using namespace std; class Time{ public: Time(int h=0,int m=0,int s=0); //构造函数 Time operator+(Time&); //运算符重载函数 void disptime(string); //输出时间函数
2015-07-09 16:01:39 300
原创 6.13~6.14
6.13 #include using namespace std; class Base{ public: Base(double h1) {h=h1;} virtual void disp() {} protected: double h; }; class Cuboid :public Base{ public: Cub
2015-07-09 15:43:58 217
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人