Is there an equivalent of list slicing [1:] from Python in C++ with vectors? I simply want to get all but the first element from a vector.
[1:]
Python\'s lis
You can follow the above answer. It's always better to know multiple ways.
int main { std::vector v1 = {1, 2, 3}; std::vector v2{v1}; v2.erase( v2.begin() ); return 0; }