I have a vector which holds a structure. Ex:
structure A { int x; int y; int z;)
vector<A> myVectorA;
Now that i have a requirement for a function which tells me to return the 0-based indices of myVectorA and function prototype is as follows.
vector<size_t> get_A() const
{
}
I am the beginner and not sure what is intended of this function and what to return from this function that matches the return type of vector<size_t>
.
Can somebody help.
Editing to Add more information.
My vector myVectorA
is a public class member and it needs to be returned from vector<size_t> get_A() const
function. But looking at the function prototype, it returns vector<size_t>
So my question is how to convert a vector of type Structure A (myVectorA
here) to another vector of type vector<size_t>