double fun(vector<vector<double> > r2, int iMass[N],int iIndex)
then I declare a 2-D vector as follows
vector <vector <double> > vec;
I resize the vector appropriately using vec.resize(3) and vec[i].resize(3) etc...
now I try to pass the vector to fun as follows
DensityCalc(vec, iMass,0);
But I get the following error
52 C:\Documents and Settings\Tansel\My Documents\Saved\C++ Project\SPH.cpp no matching function for call to `DensityCalc(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >*, int[3], int)'
above the declarations and didn't call the function
fun<3>(vec, iMass,0);
It works now.
By the way firedraco you also hit the nail on the head because my function declarations had one returning double and the other not, thank you. Time to go sleep I think
Also apologies for the double thread, browser got stuck for a bit.