is there easy way to clear nested vector?
I use nested vectors a lot and I am wondering is there a easy way to clear such data structure than use many nested for loop to clear each vectors?
For example, assume I am going to release a nested vector v, I have to write
vector<vector<int > > v;
and it becomes quite ugly when I have 3D or 4D vectors... Is there any easier way to clear the vector(especially when the elements in vector are pointers) ?