return a multidimensional vector from a function

Discussion in 'C' started by vagelis, Dec 14, 2010.

  1. vagelis

    vagelis New Member

    Joined:
    Dec 12, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    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??
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice