Difference between vector V[] and vector< vector> > V

前端 未结 5 1700
陌清茗
陌清茗 2020-12-28 17:06

vector V[] and vector< vector > V both are 2D array.

But what is the differenc

5条回答
  •  醉梦人生
    2020-12-28 17:27

    vector V[] is just a fixed array; and so you can add/modify only till the upper limit. It is not a vector per se, and so has a fixed size limit. However vector< vector > V is a dynamic vector and its size can be increased dynamically.

提交回复
热议问题