二维vector的初始化

Posted 幽殇默

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了二维vector的初始化相关的知识,希望对你有一定的参考价值。

const int n=5,m=10;
vector< vector<int> > ve(n,vector<int>(m,0));

//n行m列

以上是关于二维vector的初始化的主要内容,如果未能解决你的问题,请参考以下文章

二维vector的初始化

二维vector初始化

c++ 二维vector的初始化及构造

C++ vector 一维 二维数组 初始化 为0

C++ std::vector 一维 二维数组 初始化 为0

二维数组初始化vector, 以及类型转换问题