Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dana@lucy:~/dataStructures/assignment1$ make
- g++ -Wall -Wextra -std=c++11 test_fromArray.cpp -o test_fromArray
- In file included from test_fromArray.cpp:1:0:
- Node.hpp:42:6: error: ‘T’ was not declared in this scope
- Node<T>* copyList(Node<T>* n) {
- ^
- Node.hpp:42:7: error: template argument 1 is invalid
- Node<T>* copyList(Node<T>* n) {
- ^
- Node.hpp:42:24: error: ‘T’ was not declared in this scope
- Node<T>* copyList(Node<T>* n) {
- ^
- Node.hpp:42:25: error: template argument 1 is invalid
- Node<T>* copyList(Node<T>* n) {
- ^
- Node.hpp: In function ‘int* copyList(int*)’:
- Node.hpp:46:11: error: ‘T’ was not declared in this scope
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:12: error: template argument 1 is invalid
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:24: error: invalid type in declaration before ‘=’ token
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:35: error: the value of ‘T’ is not usable in a constant expression
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:11: note: ‘T’ was not declared ‘constexpr’
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct Node’
- Node <T>* new_node = new Node<T>();
- ^
- Node.hpp:46:36: error: expected a type, got ‘T’
- Node.hpp:47:15: error: request for member ‘data’ in ‘* new_node’, which is of non-class type ‘int’
- new_node->data = n->data;
- ^
- Node.hpp:47:25: error: request for member ‘data’ in ‘* n’, which is of non-class type ‘int’
- new_node->data = n->data;
- ^
- Node.hpp:48:15: error: request for member ‘next’ in ‘* new_node’, which is of non-class type ‘int’
- new_node->next = copy(n->next);
- ^
- Node.hpp:48:30: error: request for member ‘next’ in ‘* n’, which is of non-class type ‘int’
- new_node->next = copy(n->next);
- ^
- Node.hpp:48:34: error: ‘copy’ was not declared in this scope
- new_node->next = copy(n->next);
- ^
- Node.hpp:48:34: note: suggested alternative:
- In file included from /usr/include/c++/4.9/bits/locale_facets.h:48:0,
- from /usr/include/c++/4.9/bits/basic_ios.h:37,
- from /usr/include/c++/4.9/ios:44,
- from /usr/include/c++/4.9/ostream:38,
- from /usr/include/c++/4.9/iostream:39,
- from Node.hpp:8,
- from test_fromArray.cpp:1:
- /usr/include/c++/4.9/bits/streambuf_iterator.h:293:5: note: ‘std::copy’
- copy(istreambuf_iterator<_CharT> __first,
- ^
- Makefile:19: recipe for target 'test_fromArray' failed
- make: *** [test_fromArray] Error 1
- dana@lucy:~/dataStructures/assignment1$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement