-1

I have a final exam on data structures tomorrow, prof. distributed suplemantary questions. one of them is below.While dealing with this I'm stuck at line-3 and line-4. What does "B(2,A)" mean?also "X < int > C (3, 5);"at line-4 is a problem for me. I know B is queue but what is X then ? Thanks in advance

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)
  • You should read a good C++ book, [here](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) are some good resources – Tejendra Jan 17 '17 at 10:34
  • And change teacher, whoever wrote that exam text should be fired, I couldn't read after choking on void main(void)... – roalz Jan 17 '17 at 10:43

1 Answers1

0

This is a constructor that constructs a new queue based off your previous queue. You can read more about it here in the C++ reference. This is a really good source to learn about data structures in C++.