I am getting a strange c++ error:
main.cpp:81:9: error: request for member ‘push_back’ in ‘points’, which is of non-class type ‘std::vector<std::vector<float> >()’
I am reading this like c++ is trying to tell me that the function push_back
is not part of the vector class. Here is my relevant code:
vector<vector<float> > points(); //construct an empy vector of vectors
vector<float> first(3,0); //construct 0 vector in R^3
points.push_back(first); //put (0, 0, 0) in points
- Where is my error here and why does c++ not like this? This seems very intuitive to me.
All help is greatly appreciated!