monkeyking
January 28th, 2009, 03:35 AM
Hey,
Is it possible to have a vector with pointers to structs like
struct datPoint{
int x;
int y;
int z;
int date;
double **data
}
and then something like
vector<*datPoints> vv;
but this gives me an error that looks like.
runRelate.cpp: In function ‘std::vector<iArray, std::allocator<iArray> > getTestIndividuals(const char*)’:
runRelate.cpp:325: error: no matching function for call to ‘std::vector<iArray, std::allocator<iArray> >::push_back(iArray*&)’
/usr/include/c++/4.2/bits/stl_vector.h:597: note: candidates are: void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = iArray, _Alloc = std::allocator<iArray>]
thanks in advance
Is it possible to have a vector with pointers to structs like
struct datPoint{
int x;
int y;
int z;
int date;
double **data
}
and then something like
vector<*datPoints> vv;
but this gives me an error that looks like.
runRelate.cpp: In function ‘std::vector<iArray, std::allocator<iArray> > getTestIndividuals(const char*)’:
runRelate.cpp:325: error: no matching function for call to ‘std::vector<iArray, std::allocator<iArray> >::push_back(iArray*&)’
/usr/include/c++/4.2/bits/stl_vector.h:597: note: candidates are: void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = iArray, _Alloc = std::allocator<iArray>]
thanks in advance