自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(52)
  • 收藏
  • 关注

原创 大一下学习总结

经过本学期的c++学习,我学会了好多知识。但是也有好多不知道的知识点,第一次接触反转课堂,第一次需要在课前观看学习视频。刚开始,觉得这一切非常新鲜,每次老师发布了什么新的资源和视频,都会第一时间去观看。每次老师布置了什么上机实践,都会在宿舍或者在机房完成,然后再发博文。每次老师发布了视频,我都会在有无线网的地方缓存下来,然后在课下的空闲时间观看,每次都津津有味的看完,每次学到知识就感觉自己很棒。但

2016-06-23 22:33:11 562

原创 2016下学期c++学习总结

经过本学期的c++学习,我学会了好多知识。但是也有好多不知道的知识点,第一次接触反转课堂,第一次需要在课前观看学习视频。刚开始,觉得这一切非常新鲜,每次老师发布了什么新的资源和视频,都会第一时间去观看。每次老师布置了什么上机实践,都会在宿舍或者在机房完成,然后再发博文。但是在大学嘛,都是靠自己的自制力,不像在初中和高中一样,老师和父母天天跟着自己,逼着自己学习。没有了外界的约束,我有时候觉得自己可

2016-06-23 20:16:15 627

原创 点 圆柱类的设计3

#include  using namespace std;  class Point  {  public:      Point(double xx=0,double yy=0)      {          x=xx;          y=yy;      }      void setpoint(double ,double);     

2016-06-14 21:44:36 384

原创 点 圆柱类的设计2

#include  using namespace std;  class Point  {  public:      Point(double xx=0,double yy=0)      {          x=xx;          y=yy;      }      void setpoint(double ,double);     

2016-06-14 21:43:26 332

原创 点 圆柱类的设计1

#include  using namespace std;  class Point  {  public:      Point(double xx=0,double yy=0)      {          x=xx;          y=yy;      }      void setpoint(double ,double);     

2016-06-14 21:40:23 374

原创 警察与厨师2

#include    using namespace std;  class Person  {  public:      Person(int a,string nam);      void action();      string getname(){return name;}  protected:      int age;     

2016-06-14 21:38:57 236

原创 警察和厨师1

#include    using namespace std;  class Person  {  public:      Person(int a,string nam);      void action();      string getname(){return name;}  protected:      int age;     

2016-06-14 21:38:01 319

原创 两个成员的类模板2

#include #include using namespace std;template class Test{public:    Test();    Test(T1 d1, T2 d2);    template Test(const Test &t);    void SetData1(T1 val)    {        data1

2016-06-14 12:30:36 217

原创 数组类运算

#include #include #include using namespace std;class Array{private:    int* list;      //用于存放动态分配的数组内存首地址    int size;       //数组大小(元素个数)public:    Array(int sz = 50);     //构造

2016-06-14 12:22:58 300

原创 分数类的运算符重载

#include  #include  using namespace std;  class CFraction  {  private:      int nume;  // 分子      int deno;  // 分母  public:      //构造函数及运算符重载的函数声明      CFraction(int nu=0,int de=

2016-06-14 09:05:50 783

原创 Time类的运算符重载

#include   #include   using namespace std;  class CTime  {  private:      unsigned short int hour;    // 时      unsigned short int minute;  // 分      unsigned short int second;  // 秒  

2016-06-14 09:04:10 335

原创 三角形类雏形5

#include  #include  using namespace std;  class Triangle  {  public:      Triangle(double x=1,double y=1,double z=1)      {          a=x;          b=y;          c=z;      }   

2016-06-12 12:51:11 239

原创 三角形类雏形4

#include  #include  using namespace std;  class Triangle  {  public:      Triangle(double x=1,double y=1,double z=1)      {          a=x;          b=y;          c=z;      }   

2016-06-12 12:50:01 226

原创 三角形类雏形3

#include  #include  using namespace std;  class triangle  {  public:      triangle(double x,double y,double z)      {          a=x;          b=y;          c=z;      }      doub

2016-06-12 12:48:51 260

原创 三角形类雏形2

#include  #include  using namespace std;  class triangle  {  public:      void setA(double x)      {          a=x;      }      void setB(double y)      {          b=y;      }

2016-06-12 12:47:53 238

原创 三角形类雏形1

#include#includeusing namespace std;class triangle{public:    void setABC(double x,double y,double z);    double perimeter();    double area();private:    double a,b,c;};void t

2016-06-12 12:46:35 486

原创 运算符重载 复数类 *

#include using namespace std;class Complex{public:    Complex(){real=0;imag=0;}    Complex(double r,double i){real=r;imag=i;}    Complex operator*(const Complex &c2);    void display()

2016-06-09 09:19:35 1227

原创 运算符重载 复数类 /

#include using namespace std;class Complex{public:    Complex(){real=0;imag=0;}    Complex(double r,double i){real=r;imag=i;}    Complex operator/(const Complex &c2);    void display()

2016-06-09 09:19:00 517

原创 运算符重载 复数类 -

#include using namespace std;class Complex{public:    Complex(){real=0;imag=0;}    Complex(double r,double i){real=r;imag=i;}    Complex operator-(const Complex &c2);    void display()

2016-06-09 09:17:42 346

原创 运算符重载 负数类 +

#include using namespace std;class Complex{public:    Complex(){real=0;imag=0;}    Complex(double r,double i){real=r;imag=i;}    Complex operator+(const Complex &c2);    void display()

2016-06-09 09:16:56 468

原创 指向学生类的指针

#include    using namespace std;    class Student  {  public:      Student(int n,double s):num(n),score(s){};      void display();      int getnum()      {          return num;

2016-06-08 17:16:29 164

原创 人数不定的工资类

#include  using namespace std;    class Salary  {  public:      Salary(int n);      ~Salary();         void input_salary();      void show_salary();  private:      double *salary

2016-06-07 21:47:06 183

原创 圆柱类的设计

#include  using namespace std;  class Point  {  public:      Point(double xx=0,double yy=0)      {          x=xx;          y=yy;      }      void setpoint(double ,double);     

2016-06-07 21:44:04 420

原创 阅读

运用可了构造函数和复制构造函数,还有类的继承。

2016-06-06 20:44:34 687

原创 第四周上机 用递归解决问题

#include  using namespace std;  int f(int n);  int main( )  {      int n;      cin>>n;      if(n%2!=0)          cout    else          cout    return 0;  }  int f(int n)  {

2016-06-06 20:39:49 208

原创 储存班长的学生类信息

#include  using namespace std;  class Stu   //声明基类  {  public:      Stu(int n, string nam );  //基类构造函数      void display( );          //成员函数,输出基类数据成员      int getnum(){return num;}   

2016-06-06 20:37:59 201

原创 用友元函数实现复数类的运算符重载

#include  using namespace std;  class Complex  {  public:      Complex()      {          real=0;          imag=0;      }      Complex(double r,double i)      {          real=r

2016-06-06 17:59:55 1498

原创 复数类的运算符重载

#include  using namespace std;  class Complex  {  public:      Complex(){real=0;imag=0;}      Complex(double r,double i){real=r; imag=i;}      Complex operator+(const Complex &c2);   

2016-06-06 17:58:26 247

原创 长方住类

#include  using namespace std;  class Bulk  {  public:      Bulk(double x=1.0,double y=1.0,double z=1.0):lengh(x),width(y),height(z) {};      void get_value();      void display();  p

2016-06-05 16:59:29 678

原创 为类模板加上构造函数和默认构造函数

#include #include using namespace std;template class Test{public:    Test();    Test(T1 d1, T2 d2);    template Test(const Test &t);    void SetData1(T1 val)    {        data1

2016-06-02 17:55:56 11648

原创 两个成员的类模板

#include #include using namespace std;template class  Test{public:    void SetData1(T1 val)    {        data1=val;    }    void SetData2(T2 val)    {        data2=val;    }

2016-06-02 17:54:04 222

原创 排序函数模板

#include #includeusing namespace std;templatevoid Sort(T *a,int size){    int i,j;    T b;    for(i=0;i    {        for(j=0;j        {            if(a[j]>a[j+1])            {

2016-05-31 15:05:02 239

原创 春哥来了

这里主要用了类的继承,还考察了我们对构造函数的理解与运用

2016-05-30 17:07:59 435

原创 继承

#include  #include  using namespace std;  class Teacher  {  public:      Teacher(string nam,int a,char s,string tit,string ad,string t);      void display();  protected:      string

2016-05-30 16:56:51 169

原创 时间类

#includeusing namespace std;class Date{public:    void SetDate(int y,int m,int d)    {        Year=y;        Month=m;        Day=d;    }    void PrintDate()    {        cout

2016-05-30 16:54:05 252

原创 警察与厨师

#include using namespace std;class Person{public:    Person(int, string);    void action();    string getName()    {        return name;    }private:    int age;    strin

2016-05-30 16:47:40 178

原创 继承与派生 一

本段程序运用了继承与派生,类D是类G的共有继承,并且通过运行结果,还可以看出,析构函数的调用顺序好构造函数的调用顺序正好相反。

2016-05-29 18:20:50 179

原创 用纯虚函数求面积

#include using namespace std;class Shape{public:    virtual double area(){}};class circle:public Shape{public:    circle(double x)    {        r=x;    }    double area() 

2016-05-28 09:24:51 793

原创 运用类的继承和派生实现动物怎么叫

本来自己这学期没怎么主动学过习,可是发博客又有好多东西不会,只好把云班课上得视频尽量多的看一下,不会的定西参考一下贺老师的博客或问一下学的好的同学,通过本次博客,我了解了类的继承和派生,还有虚函数。

2016-05-28 08:53:35 953

原创 分数重载运算符1

#include #include using namespace std;class CFraction{private:    int nume;      int deno;  public:    CFraction(int nu=0,int de=1):nume(nu),deno(de) {}    void simplify();    fr

2016-05-22 21:07:09 310

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除