会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
bobo哥
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
9
10
11
12
13
14
15
16
17
···
54
下一页
2021年3月18日
静态路由实验
摘要: 原图
阅读全文
posted @ 2021-03-18 19:25 bobo哥
阅读(62)
评论(0)
推荐(0)
2021年2月10日
简单的类编程-简单
摘要: 声明一个circle类,有数据成员Radius(半径float型),成员函数GetArea()计算圆的面积。在main 函数中声明一个circle类的对象c1,其半径为5.6。调用GetArea()函数计算c1的面积,并显示该计算 结果(cout<<"圆的面积:"<<c1.GetArea()<<en
阅读全文
posted @ 2021-02-10 18:48 bobo哥
阅读(336)
评论(2)
推荐(0)
静态变量应用-简单
摘要: 源程序: #include <iostream>using namespace std;class Sample{ int n; static int sum;public: Sample(int x) { n = x; } void add() { sum += n; } void disp()
阅读全文
posted @ 2021-02-10 18:40 bobo哥
阅读(102)
评论(0)
推荐(0)
成员函数的运算符重载operator+
摘要: 源程序: #include <iostream>using namespace std;class Sample{private: int x;public: Sample() {} Sample(int a) { x = a; } void disp() { cout << "x=" << x <
阅读全文
posted @ 2021-02-10 18:34 bobo哥
阅读(139)
评论(0)
推荐(0)
友元函数的运算符重载operator+
摘要: 源程序: #include <iostream>using namespace std;class Sample{private: int x;public: Sample() {} Sample(int a) { x = a; } void disp() { cout << "x=" << x <
阅读全文
posted @ 2021-02-10 17:49 bobo哥
阅读(166)
评论(0)
推荐(0)
2021年1月30日
c++数组中最大值和最小值相加
摘要: 源程序 #include <iostream>using namespace std;void main(){ int a[6]={23,15,64,33,40,58}; int s1,s2; s1=s2=a[0]; for(int *p=a+1;p<a+6;p++) { if(s1 > *p) s
阅读全文
posted @ 2021-01-30 13:20 bobo哥
阅读(287)
评论(0)
推荐(0)
c++多重继承
摘要: 设计一个圆类circle和一个桌子类table。circle类包含私有数据成员radius和求圆面积的成员函数getarea();table类包含私有数据成员height和返回高度的成员函数getheight()。roundtable类继承所有上述类的数据成员和成员函数,添加了私有数据成员color
阅读全文
posted @ 2021-01-30 13:17 bobo哥
阅读(151)
评论(0)
推荐(0)
2020年12月29日
典型的java面向对象的程序架构
摘要: 源程序: class Point{ int x,y; Point(int a,int b) { x=a; y=b; } void show() { System.out.print(x+" "); System.out.print(y+" "); System.out.println(); //换行
阅读全文
posted @ 2020-12-29 20:56 bobo哥
阅读(134)
评论(0)
推荐(1)
2020年12月28日
c++多重继承典型小程序
摘要: 源程序: #include <iostream>using namespace std; class Base1{public: Base1() { b1=6; } Base1(int i) { b1=i; } int get1() { return b1; }private: int b1;};
阅读全文
posted @ 2020-12-28 21:04 bobo哥
阅读(100)
评论(0)
推荐(0)
典型的复制构造函数用法
摘要: 源程序: #include <iostream>using namespace std;class Point{private: int X,Y;public: Point(int a=0,int b=0) { X=a; Y=b; cout<<"Initializing……"<<endl; } Po
阅读全文
posted @ 2020-12-28 20:13 bobo哥
阅读(200)
评论(0)
推荐(0)
上一页
1
···
9
10
11
12
13
14
15
16
17
···
54
下一页
公告