会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
牧羊少年10号
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
下一页
2016年3月26日
递归经典问题详解
摘要: 1 递归需要满足的两个条件:(1)有反复执行的过程(调用自身);(2)有跳出反复执行过程的条件(递归出口)。2 递归经典例子:(1) 阶乘n!=n*(n-1)*(n-2)*...1(n>0)int recursive(int n){ int result=0; ...
阅读全文
posted @ 2016-03-26 13:32 牧羊少年10号
阅读(219)
评论(0)
推荐(0)
2016年3月15日
关于MFC中使用vector的问题
摘要: 在Dlg.h文件中加入 #include using namespace std;extern vector aaa; 再在Dlg.cpp文件中加入vector aaa; 详情参考http://bbs.csdn.net/topics/390573469 ...
阅读全文
posted @ 2016-03-15 10:24 牧羊少年10号
阅读(1178)
评论(0)
推荐(0)
C++全局常量与变量的定义方法
摘要: 1 全局变量(extern)当两个类都需要使用共同的变量,我们将这些变量定义为全局变量。比如,res.h和res.cpp分别来声明和定义全局变量,类ProducerThread和ConsumerThread来使用全局变量。/**********res.h声明全局变量*...
阅读全文
posted @ 2016-03-15 09:59 牧羊少年10号
阅读(919)
评论(0)
推荐(0)
2016年3月13日
儿子和女儿——解释器和编译器的区别与联系
摘要: 菜鸟经常将编译器和解释器弄混淆,无奈之下,于是向高手请教。 高手说:“ 解释器是一条一条的解释执行源语言。比如php,postscritp,javascript就是典型的解释性语言。 编译器是把源代码整个编译成目标代码,执行时不在需要编译器,直接在支持目标代...
阅读全文
posted @ 2016-03-13 23:47 牧羊少年10号
阅读(178)
评论(0)
推荐(0)
程序占用内存分布
摘要: 一个由C/C++编译的程序占用的内存分为以下几个部分1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数名,局部变量的名等。其操作方式类似于数据结构中的栈。2、堆区(heap)— 由程序员分配释放, 若程序员不释放,程序结束时可能由OS回收。注意它与数据结...
阅读全文
posted @ 2016-03-13 23:36 牧羊少年10号
阅读(149)
评论(0)
推荐(0)
链表的部分翻转
摘要: #include #include #include using namespace std;typedef struct tagSNode{ int value; tagSNode* pNext; tagSNode(int x) :value(x), pNext(N...
阅读全文
posted @ 2016-03-13 21:17 牧羊少年10号
阅读(127)
评论(0)
推荐(0)
链表相加
摘要: #include #include #include using namespace std;typedef struct tagSNode{ int value; tagSNode* pNext; tagSNode(int x) :value(x), pNext(N...
阅读全文
posted @ 2016-03-13 14:44 牧羊少年10号
阅读(110)
评论(0)
推荐(0)
Eratosthenes筛计算N以内的素数
摘要: #include #include #include using namespace std;vector GetPrimeNumber(const int N){ vector b; int* a = new int[N+1]; a[1] = false; for ...
阅读全文
posted @ 2016-03-13 13:47 牧羊少年10号
阅读(89)
评论(0)
推荐(0)
如何创建指定大小的数组/字符串
摘要: #include #include #include using namespace std;int main(){ vector a(10); int b[10]; int *c = new int[10]; char str2[10]; char *str3 =...
阅读全文
posted @ 2016-03-13 13:24 牧羊少年10号
阅读(544)
评论(0)
推荐(0)
2016年3月11日
走近腾讯 走进腾讯(一个关于面试准备的记录)
摘要: 走近腾讯 走进腾讯 ――谨以此文献给所有找工的战友前言 本人是03计A一学生,一个普通的潮州男生。我热爱我的专业,热爱软件开发,喜欢开发给...
阅读全文
posted @ 2016-03-11 22:42 牧羊少年10号
阅读(274)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
下一页
公告