【发布时间】:2017-06-01 08:55:57
【问题描述】:
我明天要参加数据结构的期末考试,教授。分发的补充问题。其中一个在下面。在处理这个问题时,我被困在第 3 行和第 4 行。 "B(2,A)" 是什么意思?第 4 行的 "X C (3, 5);" 对我来说也是个问题。我知道 B 是队列,但 X 是什么?提前致谢
Draw a diagram that shows the data structures created when the following code is executed:
1-void main (void)
2-{ Queue<int> A; for (int i=0; i<5; i++) A.QInsert(i);
3-X < Queue <int> > B (2, A);
4-X < int > C (3, 5);
5-Stack <X <int> > D; for (int i=5; i<6; i++) D.Push (C)
【问题讨论】:
-
你应该读一本好的 C++ 书,here 是一些很好的资源
-
换个老师,写考试的人应该被解雇,我在 void main(void) 窒息后无法阅读......
标签: c++ oop data-structures stack queue