- 博客(6)
- 收藏
- 关注
转载 C++关于指针的简单知识
1. 指针变量保存的是内存地址。用指针访问数据也称为间接寻址。类似于你找一个人,他住在“第一大院”。你直接去找第一大院就是直接寻址。如果他的住址只有一个住在“第五大院”的人知道,你去第五大院问出他家在第一大院这就是间接寻址。1.+ 对于上面这种情况,如果我们认为第五大院是“知道他家住址的那个人的住址”,我们就可以进行一连串的间接寻址。另一方面也说明指针变量保存的地址也是数据的一种。2. 指
2013-09-05 11:08:35
437
转载 练习4.1 E2 解答
1、Node p0 = new Node( 0 ); Node p1 = p0next = new Node(1);2、Node p0 = new Node(0);Node p1 = new Node( 1,P0);Node p2 = p1;3、Node p0 = new Node( 0);Node p1 = p0next = new Node( 1 );Node
2013-09-05 10:44:27
421
转载 Exercise 3.3 E7 解答
Rewrite the methods for queue processing from the text, using a flag to indicate a full queue instead of keeping a count of the entries in the queue. 重新编写课本中队列处理的方法,使用一个标志而不是保持队列中元素个数的计数来指示满队列。解答:
2013-08-28 21:09:20
405
转载 Exercises 2.2 E2(b)解答
Error_code copy_stack(Stack dest, Stack source) {Error_code detected = success; Stack temp; Stack_entry item; while (detected == success source.e
2013-08-28 21:07:32
426
转载 作业
解:(1)n=3时,1、2、3停在左车道上。一:3到支线,2到支线,然后1到右车道,2到右车道,3到右车道。新排列为3、2、1。二:3到支线,2到右车道,然后3到右车道,1到右车道。新排列为1、3、2。三:3到支线,2到右车道,然后1到右车道,3到右车道。新排列为3、1、2。四:3到右车道,2到支线,然后1到右车道,2到右车道。新排列为2、1、3。(2)n=4时,1、2、3
2013-08-25 16:06:11
470
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人