Hi all. I'm passing a number of large vectors of doubles to a class. I don't know the number of vectors that will be needed at compile time and I want to avoid creating multiple copies of the vectors. Hence I'm passing them as a vector of pointers to vectors of doubles, i.e. void myfunc(vector< vector < double >* > passed_arrays); I only use the data from the vectors and do not change them so I want to make this const correct. I've tried myfunc(vector< const vector * > passed_array); but then if the user passes a non-const vector I get errors abount cannot convert from std::vector to const std::vector. Any ideas where I need to put my const(s)?
Make the vector constant use the following method:- Code: myfunc(vector< const vector * > const passed_array);