Advertisement
Guest User

:(

a guest
Feb 4th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. In file included from Queue.h:7:0,
  2. from Queue.C:4:
  3. Stack.h:30:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
  4. friend ostream& operator<< (ostream&,Stack<T>&);
  5. ^
  6. 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)
  7. In file included from Stack.C:5:0:
  8. Stack.h:30:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
  9. friend ostream& operator<< (ostream&,Stack<T>&);
  10. ^
  11. 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)
  12. In file included from Queue.h:7:0,
  13. from main.C:2:
  14. Stack.h:30:49: warning: friend declaration ‘std::ostream& operator<<(std::ostream&, Stack<T>&)’ declares a non-template function [-Wnon-template-friend]
  15. friend ostream& operator<< (ostream&,Stack<T>&);
  16. ^
  17. 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)
  18. g++ -static *.o -o main
  19. main.o: In function `main':
  20. main.C:(.text+0xd4): undefined reference to `operator<<(std::ostream&, Stack<int>&)'
  21. collect2: error: ld returned 1 exit status
  22. make: *** [main] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement