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
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
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 functionvoid 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...................
1 2
from main with without
void Que<T>::Mutotofront(const Que<T>& ele,int n)
1 2 3 4 5 6 7 8
Enter the element of the list type -1 to finish
1 2 3 4 -1
front 11583160 1 2 3 4 back// those number in bold the program generate and I do no know the reason
The QueueLinkedLIst has 5-1 // apparently the list has 4 elements, so do not count the 11583160 numbers
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??????????????????