Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   return a multidimensional vector from a function (http://www.go4expert.com/forums/return-multidimensional-vector-function-t24174/)

vagelis 14Dec2010 13:16

return a multidimensional vector from a function
 
i want to receive a vector that will have 3 two dimensional vectors
for example

Code:

int main()
{
vector<vector<vector<int>>>  ab=function()[0];
}
 
vector<vector<vector<int>>>  function()
{
vector<vector<vector<int>>>  return_vector;
vector<vector<int>> first;
vector<vector<int>> second;
vector<vector<int>> third;
 
 
//give values to three vectors and then isert them to return_vector
 
 
return_vector.push_back(first);
return_vector_push_back(second);
return_vector.push_back(third);
 
return return_vector;
}


i know that this is not the appropriate form but how can be that done??


All times are GMT +5.5. The time now is 07:29.