Advertisement
cromiium

compiling_error.txt

Oct 18th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.02 KB | None | 0 0
  1. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  2. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
  3. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  4. ^
  5. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
  6. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
  7. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:59: error: template argument 1 is invalid
  8. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:49: error: invalid use of template-name 'Bag' without an argument list
  9. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  10. ^
  11. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:55:52: error: expected ',' or '...' before '<' token
  12. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  13. ^
  14. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:17: error: using template type parameter 'TYPE' after 'class'
  15. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  16. ^
  17. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:21: error: template argument 1 is invalid
  18. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  19. ^
  20. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:59:34: error: expected initializer before 'Bag'
  21. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  22. ^
  23. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:11: error: using template type parameter 'TYPE' after 'class'
  24. Bag<class TYPE>::Bag(size_type initial_capacity)
  25. ^
  26. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:15: error: template argument 1 is invalid
  27. Bag<class TYPE>::Bag(size_type initial_capacity)
  28. ^
  29. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:22: error: conflicting declaration of template 'template<class TYPE> int Bag'
  30. Bag<class TYPE>::Bag(size_type initial_capacity)
  31. ^
  32. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
  33. class Bag {
  34. ^
  35. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:62:22: error: 'size_type' was not declared in this scope
  36. Bag<class TYPE>::Bag(size_type initial_capacity)
  37. ^
  38. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:11: error: using template type parameter 'TYPE' after 'class'
  39. Bag<class TYPE>::Bag(const Bag& source)
  40. ^
  41. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:15: error: template argument 1 is invalid
  42. Bag<class TYPE>::Bag(const Bag& source)
  43. ^
  44. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:70:28: error: invalid use of template-name 'Bag' without an argument list
  45. Bag<class TYPE>::Bag(const Bag& source)
  46. ^
  47. 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&)'
  48. Bag<class TYPE>::Bag(const Bag& source)
  49. ^
  50. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
  51. class Bag {
  52. ^
  53. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:16: error: using template type parameter 'TYPE' after 'class'
  54. void Bag<class TYPE>::reserve(size_type new_capacity)
  55. ^
  56. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:20: error: template argument 1 is invalid
  57. void Bag<class TYPE>::reserve(size_type new_capacity)
  58. ^
  59. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:31: error: variable or field 'reserve' declared void
  60. void Bag<class TYPE>::reserve(size_type new_capacity)
  61. ^
  62. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:80:31: error: 'size_type' was not declared in this scope
  63. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:11: error: using template type parameter 'TYPE' after 'class'
  64. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  65. ^
  66. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:15: error: template argument 1 is invalid
  67. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  68. ^
  69. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:98:28: error: expected initializer before 'Bag'
  70. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  71. ^
  72. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:16: error: using template type parameter 'TYPE' after 'class'
  73. bool Bag<class TYPE>::erase_one(const value_type& target)
  74. ^
  75. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:20: error: template argument 1 is invalid
  76. bool Bag<class TYPE>::erase_one(const value_type& target)
  77. ^
  78. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:115:39: error: 'value_type' does not name a type
  79. bool Bag<class TYPE>::erase_one(const value_type& target)
  80. ^
  81. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'bool erase_one(const int&)':
  82. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:117:3: error: 'size_type' was not declared in this scope
  83. size_type index; // The location of target in the data array
  84. ^
  85. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:122:3: error: 'index' was not declared in this scope
  86. index = 0;
  87. ^
  88. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:123:19: error: 'used' was not declared in this scope
  89. while ((index < used) && (data[index] != target))
  90. ^
  91. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:123:29: error: 'data' was not declared in this scope
  92. while ((index < used) && (data[index] != target))
  93. ^
  94. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:126:16: error: 'used' was not declared in this scope
  95. if (index == used) // target isn't in the Bag, so no work to do
  96. ^
  97. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:131:5: error: 'used' was not declared in this scope
  98. --used;
  99. ^
  100. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:132:3: error: 'data' was not declared in this scope
  101. data[index] = data[used];
  102. ^
  103. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: At global scope:
  104. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:16: error: using template type parameter 'TYPE' after 'class'
  105. void Bag<class TYPE>::insert(const value_type& entry)
  106. ^
  107. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:20: error: template argument 1 is invalid
  108. void Bag<class TYPE>::insert(const value_type& entry)
  109. ^
  110. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:36: error: 'value_type' does not name a type
  111. void Bag<class TYPE>::insert(const value_type& entry)
  112. ^
  113. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'void insert(const int&)':
  114. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:7: error: 'used' was not declared in this scope
  115. if (used == capacity) reserve(used+1);
  116. ^
  117. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:139:15: error: 'capacity' was not declared in this scope
  118. if (used == capacity) reserve(used+1);
  119. ^
  120. 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]
  121. if (used == capacity) reserve(used+1);
  122. ^
  123. 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)
  124. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:140:3: error: 'data' was not declared in this scope
  125. data[used] = entry;
  126. ^
  127. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:140:8: error: 'used' was not declared in this scope
  128. data[used] = entry;
  129. ^
  130. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: At global scope:
  131. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:16: error: using template type parameter 'TYPE' after 'class'
  132. void Bag<class TYPE>::operator +=(const Bag& addend)
  133. ^
  134. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:20: error: template argument 1 is invalid
  135. void Bag<class TYPE>::operator +=(const Bag& addend)
  136. ^
  137. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:145:41: error: invalid use of template-name 'Bag' without an argument list
  138. void Bag<class TYPE>::operator +=(const Bag& addend)
  139. ^
  140. 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
  141. void Bag<class TYPE>::operator +=(const Bag& addend)
  142. ^
  143. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:16: error: using template type parameter 'TYPE' after 'class'
  144. void Bag<class TYPE>::operator =(const Bag& source)
  145. ^
  146. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:20: error: template argument 1 is invalid
  147. void Bag<class TYPE>::operator =(const Bag& source)
  148. ^
  149. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:40: error: invalid use of template-name 'Bag' without an argument list
  150. void Bag<class TYPE>::operator =(const Bag& source)
  151. ^
  152. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:156:51: error: 'void operator=(const int&)' must be a nonstatic member function
  153. void Bag<class TYPE>::operator =(const Bag& source)
  154. ^
  155. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:177:1: error: invalid use of template-name 'Bag' without an argument list
  156. Bag::size_type Bag<class TYPE>::count(const value_type& target) const
  157. ^
  158. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:188:11: error: using template type parameter 'TYPE' after 'class'
  159. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  160. ^
  161. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:188:15: error: template argument 1 is invalid
  162. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  163. ^
  164. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h: In function 'int operator+(const Bag<TYPE>&, const Bag<TYPE>&)':
  165. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:190:7: error: missing template arguments before 'answer'
  166. Bag answer(b1.size( ) + b2.size( ));
  167. ^
  168. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:192:3: error: 'answer' was not declared in this scope
  169. answer += b1;
  170. ^
  171. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp: At global scope:
  172. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
  173. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  174. ^
  175. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
  176. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
  177. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:59: error: template argument 1 is invalid
  178. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:49: error: invalid use of template-name 'Bag' without an argument list
  179. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  180. ^
  181. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:4:52: error: expected ',' or '...' before '<' token
  182. Bag<TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE& b2);
  183. ^
  184. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:17: error: using template type parameter 'TYPE' after 'class'
  185. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  186. ^
  187. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:21: error: template argument 1 is invalid
  188. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  189. ^
  190. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:8:34: error: expected initializer before 'Bag'
  191. const Bag<class TYPE>::size_type Bag::DEFAULT_CAPACITY;
  192. ^
  193. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:11: error: using template type parameter 'TYPE' after 'class'
  194. Bag<class TYPE>::Bag(size_type initial_capacity)
  195. ^
  196. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:15: error: template argument 1 is invalid
  197. Bag<class TYPE>::Bag(size_type initial_capacity)
  198. ^
  199. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:22: error: conflicting declaration of template 'template<class TYPE> int Bag'
  200. Bag<class TYPE>::Bag(size_type initial_capacity)
  201. ^
  202. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  203. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
  204. class Bag {
  205. ^
  206. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:11:22: error: 'size_type' was not declared in this scope
  207. Bag<class TYPE>::Bag(size_type initial_capacity)
  208. ^
  209. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:11: error: using template type parameter 'TYPE' after 'class'
  210. Bag<class TYPE>::Bag(const Bag& source)
  211. ^
  212. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:15: error: template argument 1 is invalid
  213. Bag<class TYPE>::Bag(const Bag& source)
  214. ^
  215. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:19:28: error: invalid use of template-name 'Bag' without an argument list
  216. Bag<class TYPE>::Bag(const Bag& source)
  217. ^
  218. 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&)'
  219. Bag<class TYPE>::Bag(const Bag& source)
  220. ^
  221. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  222. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:14:7: note: previous declaration 'template<class TYPE> class Bag'
  223. class Bag {
  224. ^
  225. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:16: error: using template type parameter 'TYPE' after 'class'
  226. void Bag<class TYPE>::reserve(size_type new_capacity)
  227. ^
  228. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:20: error: template argument 1 is invalid
  229. void Bag<class TYPE>::reserve(size_type new_capacity)
  230. ^
  231. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:31: error: variable or field 'reserve' declared void
  232. void Bag<class TYPE>::reserve(size_type new_capacity)
  233. ^
  234. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:29:31: error: 'size_type' was not declared in this scope
  235. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:11: error: using template type parameter 'TYPE' after 'class'
  236. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  237. ^
  238. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:15: error: template argument 1 is invalid
  239. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  240. ^
  241. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:47:28: error: expected initializer before 'Bag'
  242. Bag<class TYPE>::size_type Bag::erase(const value_type& target)
  243. ^
  244. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:16: error: using template type parameter 'TYPE' after 'class'
  245. bool Bag<class TYPE>::erase_one(const value_type& target)
  246. ^
  247. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:20: error: template argument 1 is invalid
  248. bool Bag<class TYPE>::erase_one(const value_type& target)
  249. ^
  250. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:39: error: 'value_type' does not name a type
  251. bool Bag<class TYPE>::erase_one(const value_type& target)
  252. ^
  253. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:64:6: error: redefinition of 'template<class TYPE> bool erase_one(const int&)'
  254. bool Bag<class TYPE>::erase_one(const value_type& target)
  255. ^
  256. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  257. 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
  258. bool Bag<class TYPE>::erase_one(const value_type& target)
  259. ^
  260. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:16: error: using template type parameter 'TYPE' after 'class'
  261. void Bag<class TYPE>::insert(const value_type& entry)
  262. ^
  263. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:20: error: template argument 1 is invalid
  264. void Bag<class TYPE>::insert(const value_type& entry)
  265. ^
  266. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:36: error: 'value_type' does not name a type
  267. void Bag<class TYPE>::insert(const value_type& entry)
  268. ^
  269. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:86:6: error: redefinition of 'template<class TYPE> void insert(const int&)'
  270. void Bag<class TYPE>::insert(const value_type& entry)
  271. ^
  272. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  273. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.h:137:6: note: 'template<class TYPE> void insert(const int&)' previously declared here
  274. void Bag<class TYPE>::insert(const value_type& entry)
  275. ^
  276. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:16: error: using template type parameter 'TYPE' after 'class'
  277. void Bag<class TYPE>::operator +=(const Bag& addend)
  278. ^
  279. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:20: error: template argument 1 is invalid
  280. void Bag<class TYPE>::operator +=(const Bag& addend)
  281. ^
  282. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:94:41: error: invalid use of template-name 'Bag' without an argument list
  283. void Bag<class TYPE>::operator +=(const Bag& addend)
  284. ^
  285. 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
  286. void Bag<class TYPE>::operator +=(const Bag& addend)
  287. ^
  288. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:16: error: using template type parameter 'TYPE' after 'class'
  289. void Bag<class TYPE>::operator =(const Bag& source)
  290. ^
  291. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:20: error: template argument 1 is invalid
  292. void Bag<class TYPE>::operator =(const Bag& source)
  293. ^
  294. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:40: error: invalid use of template-name 'Bag' without an argument list
  295. void Bag<class TYPE>::operator =(const Bag& source)
  296. ^
  297. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:105:51: error: 'void operator=(const int&)' must be a nonstatic member function
  298. void Bag<class TYPE>::operator =(const Bag& source)
  299. ^
  300. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:126:1: error: invalid use of template-name 'Bag' without an argument list
  301. Bag::size_type Bag<class TYPE>::count(const value_type& target) const
  302. ^
  303. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:137:11: error: using template type parameter 'TYPE' after 'class'
  304. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  305. ^
  306. D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:137:15: error: template argument 1 is invalid
  307. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  308. ^
  309. 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>&)'
  310. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  311. ^
  312. In file included from D:\Users\Desktop\Desktop\College\CSC\CSC21200\Assignment 4\Bag.cpp:1:0:
  313. 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
  314. Bag<class TYPE> operator +(const Bag<TYPE>& b1, const Bag<TYPE>& b2)
  315. ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement