Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. dana@lucy:~/dataStructures/assignment1$ make
  2. g++ -Wall -Wextra -std=c++11 test_fromArray.cpp -o test_fromArray
  3. In file included from test_fromArray.cpp:1:0:
  4. Node.hpp:42:6: error: ‘T’ was not declared in this scope
  5. Node<T>* copyList(Node<T>* n) {
  6. ^
  7. Node.hpp:42:7: error: template argument 1 is invalid
  8. Node<T>* copyList(Node<T>* n) {
  9. ^
  10. Node.hpp:42:24: error: ‘T’ was not declared in this scope
  11. Node<T>* copyList(Node<T>* n) {
  12. ^
  13. Node.hpp:42:25: error: template argument 1 is invalid
  14. Node<T>* copyList(Node<T>* n) {
  15. ^
  16. Node.hpp: In function ‘int* copyList(int*)’:
  17. Node.hpp:46:11: error: ‘T’ was not declared in this scope
  18. Node <T>* new_node = new Node<T>();
  19. ^
  20. Node.hpp:46:12: error: template argument 1 is invalid
  21. Node <T>* new_node = new Node<T>();
  22. ^
  23. Node.hpp:46:24: error: invalid type in declaration before ‘=’ token
  24. Node <T>* new_node = new Node<T>();
  25. ^
  26. Node.hpp:46:35: error: the value of ‘T’ is not usable in a constant expression
  27. Node <T>* new_node = new Node<T>();
  28. ^
  29. Node.hpp:46:11: note: ‘T’ was not declared ‘constexpr’
  30. Node <T>* new_node = new Node<T>();
  31. ^
  32. Node.hpp:46:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct Node’
  33. Node <T>* new_node = new Node<T>();
  34. ^
  35. Node.hpp:46:36: error: expected a type, got ‘T’
  36. Node.hpp:47:15: error: request for member ‘data’ in ‘* new_node’, which is of non-class type ‘int’
  37. new_node->data = n->data;
  38. ^
  39. Node.hpp:47:25: error: request for member ‘data’ in ‘* n’, which is of non-class type ‘int’
  40. new_node->data = n->data;
  41. ^
  42. Node.hpp:48:15: error: request for member ‘next’ in ‘* new_node’, which is of non-class type ‘int’
  43. new_node->next = copy(n->next);
  44. ^
  45. Node.hpp:48:30: error: request for member ‘next’ in ‘* n’, which is of non-class type ‘int’
  46. new_node->next = copy(n->next);
  47. ^
  48. Node.hpp:48:34: error: ‘copy’ was not declared in this scope
  49. new_node->next = copy(n->next);
  50. ^
  51. Node.hpp:48:34: note: suggested alternative:
  52. In file included from /usr/include/c++/4.9/bits/locale_facets.h:48:0,
  53. from /usr/include/c++/4.9/bits/basic_ios.h:37,
  54. from /usr/include/c++/4.9/ios:44,
  55. from /usr/include/c++/4.9/ostream:38,
  56. from /usr/include/c++/4.9/iostream:39,
  57. from Node.hpp:8,
  58. from test_fromArray.cpp:1:
  59. /usr/include/c++/4.9/bits/streambuf_iterator.h:293:5: note: ‘std::copy’
  60. copy(istreambuf_iterator<_CharT> __first,
  61. ^
  62. Makefile:19: recipe for target 'test_fromArray' failed
  63. make: *** [test_fromArray] Error 1
  64. dana@lucy:~/dataStructures/assignment1$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement