Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:49: error: invalid use of template-name 'Bag' without an argument list
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:52: error: expected ',' or '...' before '<' token
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:17: error: using template type parameter 'TYPE' after 'class'
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:21: error: template argument 1 is invalid
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:34: error: expected initializer before 'Bag'
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:15: error: template argument 1 is invalid
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:22: error: conflicting declaration of template 'template<class TYPE> int Bag'
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
- class Bag {
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:22: error: 'size_type' was not declared in this scope
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:15: error: template argument 1 is invalid
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:28: error: invalid use of template-name 'Bag' without an argument list
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:39: error: conflicting declaration of template 'template<class TYPE> int Bag(const int&)'
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
- class Bag {
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:20: error: template argument 1 is invalid
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:31: error: variable or field 'reserve' declared void
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:31: error: 'size_type' was not declared in this scope
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:15: error: template argument 1 is invalid
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:28: error: expected initializer before 'Bag'
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:16: error: using template type parameter 'TYPE' after 'class'
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:20: error: template argument 1 is invalid
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:39: error: 'value_type' does not name a type
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'bool erase_one(const int&)':
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:117:3: error: 'size_type' was not declared in this scope
- size_type index; // The location of target in the data array
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:122:3: error: 'index' was not declared in this scope
- index = 0;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:123:19: error: 'used' was not declared in this scope
- while ((index < used) && (data[index] != target))
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:123:29: error: 'data' was not declared in this scope
- while ((index < used) && (data[index] != target))
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:126:16: error: 'used' was not declared in this scope
- if (index == used) // target isn't in the Bag, so no work to do
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:131:5: error: 'used' was not declared in this scope
- --used;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:132:3: error: 'data' was not declared in this scope
- data[index] = data[used];
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: At global scope:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:20: error: template argument 1 is invalid
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:36: error: 'value_type' does not name a type
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'void insert(const int&)':
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:7: error: 'used' was not declared in this scope
- if (used == capacity) reserve(used+1);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:15: error: 'capacity' was not declared in this scope
- if (used == capacity) reserve(used+1);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:39: error: there are no arguments to 'reserve' that depend on a template parameter, so a declaration of 'reserve' must be available [-fpermissive]
- if (used == capacity) reserve(used+1);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:39: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:140:3: error: 'data' was not declared in this scope
- data[used] = entry;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:140:8: error: 'used' was not declared in this scope
- data[used] = entry;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: At global scope:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:20: error: template argument 1 is invalid
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:41: error: invalid use of template-name 'Bag' without an argument list
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:52: error: 'void operator+=(const int&)' must have an argument of class or enumerated type
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:20: error: template argument 1 is invalid
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:40: error: invalid use of template-name 'Bag' without an argument list
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:51: error: 'void operator=(const int&)' must be a nonstatic member function
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:177:1: error: invalid use of template-name 'Bag' without an argument list
- Bag::size_type Bag<class TYPE>::count(const value_type& target) const
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:188:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:188:15: error: template argument 1 is invalid
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'int operator+(const Bag<TYPE>&, const Bag<TYPE>&)':
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:190:7: error: missing template arguments before 'answer'
- Bag answer(b1.size( ) + b2.size( ));
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:192:3: error: 'answer' was not declared in this scope
- answer += b1;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp: At global scope:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:49: error: invalid use of template-name 'Bag' without an argument list
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:52: error: expected ',' or '...' before '<' token
- Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:17: error: using template type parameter 'TYPE' after 'class'
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:21: error: template argument 1 is invalid
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:34: error: expected initializer before 'Bag'
- const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:15: error: template argument 1 is invalid
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:22: error: conflicting declaration of template 'template<class TYPE> int Bag'
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
- class Bag {
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:22: error: 'size_type' was not declared in this scope
- Bag<class TYPE>::Bag(size_type initial_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:15: error: template argument 1 is invalid
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:28: error: invalid use of template-name 'Bag' without an argument list
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:39: error: conflicting declaration of template 'template<class TYPE> int Bag(const int&)'
- Bag<class TYPE>::Bag(const Bag& source)
- ^
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
- class Bag {
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:20: error: template argument 1 is invalid
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:31: error: variable or field 'reserve' declared void
- void Bag<class TYPE>::reserve(size_type new_capacity)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:31: error: 'size_type' was not declared in this scope
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:15: error: template argument 1 is invalid
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:28: error: expected initializer before 'Bag'
- Bag<class TYPE>::size_type Bag::erase(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:16: error: using template type parameter 'TYPE' after 'class'
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:20: error: template argument 1 is invalid
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:39: error: 'value_type' does not name a type
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:6: error: redefinition of 'template<class TYPE> bool erase_one(const int&)'
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:6: note: 'template<class TYPE> bool erase_one(const int&)' previously declared here
- bool Bag<class TYPE>::erase_one(const value_type& target)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:20: error: template argument 1 is invalid
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:36: error: 'value_type' does not name a type
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:6: error: redefinition of 'template<class TYPE> void insert(const int&)'
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:6: note: 'template<class TYPE> void insert(const int&)' previously declared here
- void Bag<class TYPE>::insert(const value_type& entry)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:20: error: template argument 1 is invalid
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:41: error: invalid use of template-name 'Bag' without an argument list
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:52: error: 'void operator+=(const int&)' must have an argument of class or enumerated type
- void Bag<class TYPE>::operator +=(const Bag& addend)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:16: error: using template type parameter 'TYPE' after 'class'
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:20: error: template argument 1 is invalid
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:40: error: invalid use of template-name 'Bag' without an argument list
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:51: error: 'void operator=(const int&)' must be a nonstatic member function
- void Bag<class TYPE>::operator =(const Bag& source)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:126:1: error: invalid use of template-name 'Bag' without an argument list
- Bag::size_type Bag<class TYPE>::count(const value_type& target) const
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:137:11: error: using template type parameter 'TYPE' after 'class'
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:137:15: error: template argument 1 is invalid
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:137:17: error: redefinition of 'template<class TYPE> int operator+(const Bag<TYPE>&, const Bag<TYPE>&)'
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
- In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
- D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:188:17: note: 'template<class TYPE> int operator+(const Bag<TYPE>&, const Bag<TYPE>&)' previously declared here
- Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement