I have a function inside another function that is called by main().
Inside the innermost function a vector is created, which I would like to return to the first function, which I would further like to return to main(). I suppose that I could create the vector in main and use it as a parameter in the other functions. That is one solution. I also think that a pointer or reference would work, although I am unsure how. In addition, if I did create the function in main, wouldn't I want to pass the vector by reference, as opposed to value, for efficiency?
Any help is appreciated.