how to return a vector in c++

C++
std::vector<x>f();std::vector<X> f();
Source

Also in C++: