C:\Programming\List Practice\main.cpp||In instantiation of 'vp::list<T>& vp::list<T>::operator=(const vp::list<T>&) [with T = int]':| C:\Programming\List Practice\main.cpp|378|required from 'void vp::list<T>::sort() [with T = int]'| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 2 3 2 3 2 3 2 3 // And so on... |
6 5 3 1 8 7 2 4 pA = 6 2 8 3 pB = 5 4 7 1 calling split(): pA->x = 6 pA = 6 8 pB = 2 3 calling split(): pA->x = 6 pA = 6 pB = 8 merge() called pFront = 8 6 calling split(): pB->x = 2 pA = 2 pB = 3 merge() called pFront = 3 2 <---- OK to here merge() called pFront = 8 2 3 <--- wrong order, lost the 6 calling split(): pB->x = 5 pA = 5 7 pB = 4 1 calling split(): pA->x = 5 pA = 5 pB = 7 merge() called pFront = 7 5 calling split(): pB->x = 4 pA = 4 pB = 1 merge() called pFront = 4 1 <--- OK to here merge() called pFront = 7 1 4 5 <--- wrong order merge() called pFront = 8 5 4 1 3 2 7 <--- wrong order, lost a node (6) 8 5 4 1 3 2 7 dList.dtor(): 7 dNodes destroyed. |
0x3e2638 prev 0x3e2650 next 2 value 0x3e2698 this 0x3e2650 prev 0x3e2650 next 2 value 0x3e26b0 this |
|
|
|
|
|
|
|
|
It took 923.997ms to add items. It took 3551.16ms to sort items. Process returned 0 (0x0) execution time : 5.641 s Press any key to continue. |
|
|
5082 5082 5082 5082 5082 5082 5082 5082 5082 5082 5082 5082 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5083 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5084 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5085 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5086 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5087 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5088 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5089 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5090 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5091 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5092 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5093 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5094 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5095 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5096 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5097 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5098 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 5099 |
The merge function is iterative, which doesn't seem right. I feel like I'm mixing methods. I'll try to gain consistency there |
|
|
|
|
|
|
6 5 3 1 8 7 2 4 pA = 6 2 8 3 pB = 5 4 7 1 calling split(): pA->x = 6 pA = 6 8 pB = 2 3 calling split(): pA->x = 6 pA = 6 pB = 8 merge() called pFront = 6 8 calling split(): pB->x = 2 pA = 2 pB = 3 merge() called pFront = 2 3 merge() called pFront = 2 3 6 8 calling split(): pB->x = 5 pA = 5 7 pB = 4 1 calling split(): pA->x = 5 pA = 5 pB = 7 merge() called pFront = 5 7 calling split(): pB->x = 4 pA = 4 pB = 1 merge() called pFront = 1 4 merge() called pFront = 1 4 5 7 merge() called pFront = 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1 dList.dtor(): 8 dNodes destroyed. |
|
|