Can we use [] operator or ++ with unique pointer or shared_pointer? As we use it for raw pointer
int * a = new int[10];
a[0] = 2; // We can use [] operator;
Is there a similar way for smart pointers?
If it is there should when should I use this?
- If it is not there then Why?
- Is it also possible for MultiDimensional Array ?
shared_ptrstd::shared_ptr<std::array<int, 10>>