problem about 2 dim vector

I created 2 dim vector, vector< vector<bouble>> vec(4,vector<double>(7)).
However, one of my fuction accept input which is one dim vector, for example, function abc(vector<double> &vec). I'd like to put just one row of my 2 dim vector to this function. How should I do? I try abc(vec[0][]), but it doesn't work.

Can you show us some code? Don't forget to put [ code] (at the beginning) and [/ code] at the end (minus the spaces) of your code.
1
2
3
4
5
6
7
8
9
10

void abc(vector<double>& vec);

vector<vector<bouble> > vec(4,vector<double>(7));

int main()
{
    // select the third element (which is a vector<double>) to send to the function
    acb(vec[2]); 
}
Last edited on
Thank you so much.
Topic archived. No new replies allowed.