会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
cleverlzc
上一页
1
2
3
4
5
6
7
下一页
迭代器的类型不要搞错了
摘要: 额。。竟然把set写成vector了。。。无言。。。 vector<unsigned int>::iterator iterFollowing = followingSet.begin(); 应该是set<unsigned int>::iterator iterFollowing = followi
阅读全文
posted @ 2017-03-13 19:29 cleverlzc
阅读(139)
评论(0)
推荐(0)
编辑
vector对自定义结构体排序注意2点
摘要: // testStl.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include #include #include #include using namespace std; struct test_large : public binary_function { bool oper...
阅读全文
posted @ 2017-03-13 14:31 cleverlzc
阅读(339)
评论(0)
推荐(0)
编辑
关于C中字符数组,字符指针以及C++中string类型的两两转换及排序
摘要: // practise.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include #include using namespace std; int main() { /* 字符串转字符数组,使用strncpy_s(),比strncpy()安全*/ string str = "a...
阅读全文
posted @ 2017-03-10 21:11 cleverlzc
阅读(187)
评论(0)
推荐(0)
编辑
PlantsVsZombies_v2.0_2
摘要: 接上。
阅读全文
posted @ 2017-03-10 20:10 cleverlzc
阅读(126)
评论(0)
推荐(0)
编辑
PlantsVsZombies_v2.0_1
摘要: 第二版,改进很大!!关键是正确了!!下一版,封装结构体。
阅读全文
posted @ 2017-03-10 20:09 cleverlzc
阅读(156)
评论(0)
推荐(0)
编辑
attackZombie如何实现符合需求的攻击函数_3
摘要: 经过其他同僚的review,你想要跳的那个地方通过break或者什么其他也好,是跳不过去的。 用了goto跳过去,还跳错地方了(正确方式,只需跳到if前,不能跳到for前,for前i永远从0开始)。。。跳的地方永远是第一个豌豆射手。。。汗,无颜面对江东父老啊。。。无地自容。。。 其他同事说,封装成一
阅读全文
posted @ 2017-03-09 23:05 cleverlzc
阅读(116)
评论(0)
推荐(0)
编辑
attackZombie如何实现符合需求的攻击函数_2
摘要: 可行。 建议6.3 不要滥用goto语句。 说明:goto语句会破坏程序的结构性,所以除非确实需要,最好不使用goto语句。 可以利用goto语句方面退出多重循环;同一个函数体内部存在大量相同的逻辑但又不方便封装成函数的情况下,譬如反复执行文件操作,对文件操作失败以后的处理部分代码(譬如关闭文件句柄
阅读全文
posted @ 2017-03-08 19:23 cleverlzc
阅读(149)
评论(0)
推荐(0)
编辑
list_head.h
摘要: typedef struct list_head { struct list_head *prev; struct list_head *next; }list_head_t; #define container_of(ptr, type, member, ret) do { \ ret = (type *)((char *)ptr - (long long)(&(...
阅读全文
posted @ 2017-03-08 19:23 cleverlzc
阅读(195)
评论(0)
推荐(0)
编辑
attackZombie如何实现符合需求的攻击函数
摘要: 前面提到攻击函数有问题,但是,试了多种方法,没有达到预期的效果。。。 待解决。。。 说明:豌豆射手种植1h后开始攻击,每个豌豆射手每1h内只能攻击一次,无距离限制,但是只能攻击右边的僵尸。
阅读全文
posted @ 2017-03-08 02:07 cleverlzc
阅读(121)
评论(0)
推荐(0)
编辑
PlantsVsZombies_3
摘要: 接上,第一版,攻击函数有严重问题。
阅读全文
posted @ 2017-03-08 00:26 cleverlzc
阅读(191)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
7
下一页
导航
博客园
首页
联系
订阅
管理
公告