hw1.h:8: error: variable or field âaddEven2OddLinesâ declared void
hw1.h:8: error: âvectorâ was not declared in this scope
hw1.h:8: error: expected primary-expression before âintâ
hw1.h:8: error: âvectorâ was not declared in this scope
hw1.h:8: error: expected primary-expression before âintâ
hw1prob2.cpp: In function âint main()â:
hw1prob2.cpp:15: error: request for member âpush_backâ in âfirstâ, which is of non-class type âstd::vector<int, std::allocator<int> >()â
hw1prob2.cpp:18: error: âaddEven2OddLinesâ was not declared in this scope
hw1prob2.cpp:22: error: request for member âsizeâ in âsecondâ, which is of non-class type âstd::vector<int, std::allocator<int> >()â
hw1prob2.cpp:23: warning: pointer to a function used in arithmetic
the header file is:
Code:
#ifndef HW1_H
#define HW1_H
template <class T>
void make2dArray(T ** &x, int numberOfRows, int rowsize[]);
template <class T>
void freeGen2dArray(T ** &x, int numberOfRows);
void method(vector<int>& x, vector<int>& y);
#endif
the method signatures match so they should not cause a compiling error.