Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In file included from Queue.h:7:0,
- from Queue.C:4:
- Stack.h:30:13: error: declaration of ‘class T’
- template <class T>
- ^
- In file included from Queue.h:7:0,
- from Queue.C:4:
- Stack.h:18:10: error: shadows template parm ‘class T’
- template<class T>
- ^
- In file included from Stack.C:5:0:
- Stack.h:30:13: error: declaration of ‘class T’
- template <class T>
- ^
- In file included from Stack.C:5:0:
- Stack.h:18:10: error: shadows template parm ‘class T’
- template<class T>
- ^
- In file included from Queue.h:7:0,
- from main.C:2:
- Stack.h:30:13: error: declaration of ‘class T’
- template <class T>
- ^
- In file included from Queue.h:7:0,
- from main.C:2:
- Stack.h:18:10: error: shadows template parm ‘class T’
- template<class T>
- ^
- In file included from Stack.h:87:0,
- from Queue.h:7,
- from main.C:2:
- Stack.C: In instantiation of ‘Stack<T>::Stack(const Stack<T>&) [with T = int]’:
- Stack.C:18:23: required from ‘std::ostream& operator<<(std::ostream&, Stack<T>&) [with T = int; std::ostream = std::basic_ostream<char>]’
- main.C:27:9: required from here
- Stack.C:62:5: error: no match for ‘operator~’ (operand type is ‘Stack<int>’)
- ~Stack();
- ^
- Stack.C:62:5: note: candidates are:
- In file included from /usr/include/c++/4.8/ios:42:0,
- from /usr/include/c++/4.8/ostream:38,
- from /usr/include/c++/4.8/iostream:39,
- from Queue.h:5,
- from main.C:2:
- /usr/include/c++/4.8/bits/ios_base.h:87:3: note: std::_Ios_Fmtflags std::operator~(std::_Ios_Fmtflags)
- operator~(_Ios_Fmtflags __a)
- ^
- /usr/include/c++/4.8/bits/ios_base.h:87:3: note: no known conversion for argument 1 from ‘Stack<int>’ to ‘std::_Ios_Fmtflags’
- /usr/include/c++/4.8/bits/ios_base.h:127:3: note: std::_Ios_Openmode std::operator~(std::_Ios_Openmode)
- operator~(_Ios_Openmode __a)
- ^
- /usr/include/c++/4.8/bits/ios_base.h:127:3: note: no known conversion for argument 1 from ‘Stack<int>’ to ‘std::_Ios_Openmode’
- /usr/include/c++/4.8/bits/ios_base.h:165:3: note: std::_Ios_Iostate std::operator~(std::_Ios_Iostate)
- operator~(_Ios_Iostate __a)
- ^
- /usr/include/c++/4.8/bits/ios_base.h:165:3: note: no known conversion for argument 1 from ‘Stack<int>’ to ‘std::_Ios_Iostate’
- make: *** [*.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement