会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
198FOR
博客园
首页
新随笔
联系
订阅
管理
随笔 - 5
文章 - 0
评论 - 0
阅读 -
613
2019年3月16日
二维数组
摘要: # include # include # include using namespace std;struct twodim{ int r; int c; float *a;};struct twodim s;bool init_twodim(twodim&s, i...
阅读全文
posted @ 2019-03-16 12:23 198FOR
阅读(133)
评论(0)
推荐(0)
2019年3月15日
阿里巴巴与四十大盗——背包问题
摘要: # include # include using namespace std;const int M = 10000005;struct three{ double w; //每个宝物的重量 double v; //每个宝物的价值 double p; //性价...
阅读全文
posted @ 2019-03-15 23:28 198FOR
阅读(196)
评论(0)
推荐(0)
2019年3月14日
加勒比海——最优装载问题
摘要: 用一维数组存储古董的重量:# include # include using namespace std;const int N = 100005;double w[N];int main()输入数据double c; int n; //载重量c和古...
阅读全文
posted @ 2019-03-14 21:24 198FOR
阅读(112)
评论(0)
推荐(0)
new和delete运算符
摘要: 演示new和delete的基本用法# includeusing namespace std;int main(){ int * p; p = new int; *p = 25; //也可在内存分配时,为其准备初值,如:p = new int(25) co...
阅读全文
posted @ 2019-03-14 17:02 198FOR
阅读(79)
评论(0)
推荐(0)
内联函数与重载函数的用法
摘要: 内联函数是使用关键字inline关键字声明的函数重载函数通常用来对具有相似行为而数据类型或数据个数不同的操作提供一个通用的名称实例:# include using namespace std;inline void print(int a) //内联函...
阅读全文
posted @ 2019-03-14 16:52 198FOR
阅读(93)
评论(0)
推荐(0)
公告
昵称:
198FOR
园龄:
6年5个月
粉丝:
0
关注:
1
<
2025年6月
>
日
一
二
三
四
五
六
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔分类
面向对象程序设计 (3)
趣学算法 (2)
随笔档案
2019年3月(5)
阅读排行榜
1. 阿里巴巴与四十大盗——背包问题(196)
2. 二维数组(133)
3. 加勒比海——最优装载问题(112)
4. 内联函数与重载函数的用法(93)
5. new和delete运算符(79)
点击右上角即可分享