|
| olove05 (59) | |||||
| Queue Operations Enter -1 to finish 1 2 3 4 -1 The constructor is
Move to the front --->:0 Queue contains: front 11583160 134516988 1 2 3 4 back
I just call normally the queue with the function prototype. | |||||
Last edited on | |||||
| Bazzy (3180) | |
| what? | |
| writetonsharma (821) | |
| :O ... | |
| olove05 (59) | |
| what is the joke????? | |
| helios (4790) | |
| We don't get what you're asking. | |
| olove05 (59) | |||
| Can some one give to me which is wrong with the code? que.cpp: In member function âvoid Queue<DataType>::Mutofront(const Queue<T>&, int) [with DataType = int]â: P:55: instantiated from here que.cpp:152: error: conversion from âintâ to non-scalar type âNode<int>â requested que.cpp:156: error: cannot convert âNode<int>â to âintâ in assignment
| |||
| Bazzy (3180) | |
| What types are ptrM->info, f, b instance of? | |
| olove05 (59) | |
| f = front b = back they are variable member and ptrM is a variable pointer | |
| Bazzy (3180) | |
| I want to know the exact type | |
| olove05 (59) | |||
in the private sections
| |||
| Bazzy (3180) | |
| What about info? | |
| olove05 (59) | |||
| |||
Last edited on | |||
| Bazzy (3180) | |
Node<DataType> temp* = ptrM->info;Info is of type T, not Node<T> | |
| olove05 (59) | |
Tha is the error after I change line 14 in Motofront() .....function to Node<T> temp* = ptrM->info;to T temp* = ptrM->info;queue2.cpp: In member function âvoid Queue<T>::Motofront(const Queue<T>&, int) [with DataType = int]â: PruebaLinkedQueue.cpp:55: instantiated from here queue2.cpp:153: error: invalid conversion from âintâ to âint*â//line 14 Mutotofront()function queue2.cpp:157: error: invalid conversion from âint*â to âintâ//line 16 Mutotofront()function | |
| Bazzy (3180) | |
| Add an '&' before 'ptrM->info' | |
| olove05 (59) | |||||
| I did and I have to put a * in the line 18 too But I continuous with the super loop tha bring extras number I do not enter , they just generate This is the answer of all of thes with the function void Que<T>::Mutotofront(const Que<T>& ele,int n)No mach No mach No mach No mach No mach No mach No mach No mach No mach No mach No mach No mach No mach No mach...................
Any idea to finish with the super loooooooop!!!!! | |||||
| olove05 (59) | |
| Any idea guys?????? | |
| olove05 (59) | |||
| Hi Bazzy can you tell me a idea of thease This is the run from main Queue Operations Enter -1 to finish the element os the list 1 2 3 4 -1 front 1 2 3 4 back Enter the element to move Front --->:1 the element is:1 *** glibc detected *** ./a.out: free(): invalid pointer: 0x006a0ff4 *** ======= Backtrace: ========= /lib/libc.so.6[0x5d5a68] /lib/libc.so.6(__libc_free+0x78)[0x5d8f6f] /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xade801] ./a.out[0x8048d5e] ./a.out(__gxx_personality_v0+0x2f4)[0x80489e0] /lib/libc.so.6(__libc_start_main+0xdc)[0x5874e4] ./a.out(__gxx_personality_v0+0x65)[0x8048751]
| |||
| Bazzy (3180) | |||||
| |||||
Last edited on | |||||
| olove05 (59) | |
| Ok I did the suggestion and I continue with infinite "not mach" output, What can I do, what is wrong in the for loop that never mach the value I say to mach?????????????????? | |
Pages: [1] [2]
Registered users can post in this forum.
