Record Detail

Compile Error

/in/sam.cpp: In member function 'T Stack<T>::pop()':
/in/sam.cpp:40:15: error: there are no arguments to 'removeBack' that depend on a template parameter, so a declaration of 'removeBack' must be available [-fpermissive]
     T *curT = removeBack();
               ^~~~~~~~~~
/in/sam.cpp:40:15: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/in/sam.cpp: In member function 'T Queue<T>::pop()':
/in/sam.cpp:66:15: error: there are no arguments to 'removeFront' that depend on a template parameter, so a declaration of 'removeFront' must be available [-fpermissive]
     T *curT = removeFront();
               ^~~~~~~~~~~
/in/sam.cpp: In constructor 'Queue<T>::Queue()':
/in/sam.cpp:73:19: error: class 'Queue<T>' does not have any field named 'Dlist'
 Queue<T>::Queue():Dlist(){}
                   ^~~~~
/in/sam.cpp: In constructor 'Queue<T>::Queue(int, std::istream&)':
/in/sam.cpp:76:37: error: class 'Queue<T>' does not have any field named 'Dlist'
 Queue<T>::Queue(int n, istream &is):Dlist(){
                                     ^~~~~
/in/sam.cpp: In instantiation of 'void Stack<T>::push(T) [with T = int]':
/in/sam.cpp:89:19:   required from here
/in/sam.cpp:35:15: error: 'insertBack' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
     insertBack(curT);
     ~~~~~~~~~~^~~~~~
/in/sam.cpp:35:15: note: declarations in dependent base 'Dlist<int>' are not found by unqualified lookup
/in/sam.cpp:35:15: note: use 'this->insertBack' instead
/in/sam.cpp: In instantiation of 'void Queue<T>::push(T) [with T = Instr]':
/in/sam.cpp:80:13:   required from 'Queue<T>::Queue(int, std::istream&) [with T = Instr; std::istream = std::basic_istream<char>]'
/in/sam.cpp:165:45:   required from here
/in/sam.cpp:61:15: error: 'insertBack' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
     insertBack(curT);
     ~~~~~~~~~~^~~~~~
/in/sam.cpp:61:15: note: declarations in dependent base 'Dlist<Instr>' are not found by unqualified lookup
/in/sam.cpp:61:15: note: use 'this->insertBack' instead
/in/compile/Makefile:16: recipe for target 'buildStackMachine' failed
make: *** [buildStackMachine] Error 1

Information

Submit By
Type
Submission
Homework
Project Five: List, Stack, and Queue
Language
C++
Submit At
2022-07-25 16:39:33
Judged At
2022-07-25 16:39:33
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes