Check out example codes for "c++ how to return an empty vector". It will help you in understanding the concepts better.

Code Example 1

return vector<int>();
//or
return{};

Learn ReactJs, React Native from akashmittal.com