//Data.cpp
Data::Data (vector<double> datum, double x, double y):
_datum (datum), _x (x), _y (y) {}
Data::Data (const Data& datum):
_x (datum._x), _y (datum._y) {}
Data Data::read_from_file(string filename) {
\\getline etc. to get x and y
double point[] = {x, y};
datum = datum.push_back(point);
}
The error is at the line datum = datum.push_back(point)
"no matching function for call to 'std::vector<double, std::allocator<double> >::push_back(double [2])'"
Your vector handles ordinary double types, not double* types. When you tried to pass an array, the compiler started to cry because arrays can only be passed to pointers. Non-pointer types cannot accept arrays. Convert your array to: std::vector< double * > Vector.
I've just noticed something. Since arrays cannot be passed like this: push_back( double[2] ), you'll have to use new; I don't condone it, however, but it's an option. Ne555's solution works best.