When working with arrays in C++, is there a simple way to access multiple indices of an array at once à la Python's :
?
E.g. I have an array x of length 100. If I wanted the first 50 values of this array in Python I could write x[0:50]
. In C++ is there an easier way to access this same portion of the array other than x[0,1,2,...,49]
?