Hello I have a vector:
vector<int> myCuteVector {1,2,3,4};
Now I would like to create a subvector in such a way, that it would contain 2 first elements from myCuteVector in such a way that after modifying subvectors elements, elements of myCuteVector would change too.
Pseudo code:
vector<int> myCuteVector {1,2,3,4};
vector<int> myCuteSubVector = myCuteVector[0:2];
myCuteSubVector[0] = 5;
printf("%d", myCuteVector[0]) //would print also 5;
is it possible to achieve?