Within a function a vector could be given back via "return".
Example:
vector<int>myvector()
{
vector<int>myvector;
return myvector;
}
Better would be to work with a reference, e.g.:
vector<int>(&myvector)()
{
vector<int>myvector;
}
But this reference doesn't work. Does anyone have an idea what the correct code would be?