I have a function Scan.MakeLinearGrid() which returns a vector<vector<Vector3> >
I have another function that is made to accept this type of thing:
Scan.setAngleList(vector<vector<Vector3> >);
But if I call it like this:
Scan.setAngleList(Scan.MakeLinearGrid());
it says
error: initial value of reference to non-const must be an lvalue
Scan.setAngleList(Scan.MakeLinearGrid());
but if i do
vector<vector<Vector3> > temp = Scan.MakeLinearGrid();
Scan.setAngleList(temp);
it works fine.
Can someone explain the difference?
Thanks,
Dave