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:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
- friend ostream& operator<< (ostream&,Stack<T>&);
- ^
- Stack.h:30:49: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)
- In file included from Stack.C:5:0:
- Stack.h:30:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
- friend ostream& operator<< (ostream&,Stack<T>&);
- ^
- Stack.h:30:49: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)
- In file included from Queue.h:7:0,
- from main.C:2:
- Stack.h:30:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
- friend ostream& operator<< (ostream&,Stack<T>&);
- ^
- Stack.h:30:49: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)
- g++ -static *.o -o main
- main.o: In function `main':
- main.C:(.text+0xd4): undefined reference to `operator<<(std::ostream&, Stack<int>&)'
- collect2: error: ld returned 1 exit status
- make: *** [main] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement