I got this error and I can’t figure out why.
#include <vector>
#include <cstdlib>
#ifndef PERSONALVEC_HPP_
#define PERSONALVEC_HPP_
template <class T,class PrnT>
class PersonalVec
{
public:
PersonalVec() {}
~PersonalVec()
{
//TODO: delete vector.
}
void push_back(T& obj)
{
int index = rand()%_vec.size();
}
private:
vector<T*> _vec;
};
#endif /* PERSONALVEC_HPP_ */
Both
randandvectorare in the std namespace.Use
and