当前位置:网站首页>STL container nested container
STL container nested container
2022-06-11 19:58:00 【Mt. Qomolangma】
#include<iostream>
#include<vector>
using namespace std;
void test01()
{
vector<vector<int>>v;
vector<int>v1;
vector<int>v2;
vector<int>v3;
vector<int>v4;
for (int i = 0; i < 4; i++)
{
v1.push_back(i + 1);
v2.push_back(i + 2);
v3.push_back(i + 3);
v4.push_back(i + 4);
}
v.push_back(v1);
v.push_back(v2);
v.push_back(v3);
v.push_back(v4);
for (vector<vector<int>>::iterator it = v.begin(); it != v.end(); it++)
{
for (vector<int>::iterator vit = (*it).begin(); vit != (*it).end(); vit++)
{
cout << *vit << " ";
}
cout << endl;
}
}
int main(void)
{
test01();
system("pause");
}边栏推荐
- Summary 111111111111111111111
- ORA-01089 ORA-19809 ORA-19815 超过了恢复文件的限制
- Proficient in xmake
- AHB2APB_bridge 设计
- Xmake help 2
- 基于 Vue + Codemirror 实现 SQL 在线编辑器
- APB2standard_ handshake_ Bridge design
- Linux环境安装mysql数据库详细教程(含卸载和密码重置过程)
- Full list! 2022 Times Asia University Rankings announced!
- Anaconda安装、Jupyter Notebook默认启动路径修改及Nbextensions插件安装
猜你喜欢

RTL arbiter design
![[Sichuan University] information sharing of the first and second examinations](/img/0d/a6392e6b92bb689e90c038ffac9dd8.jpg)
[Sichuan University] information sharing of the first and second examinations

The tutor transferred me 800 yuan and asked me to simulate a circuit (power supply design)

Yolov3 pytoch code and principle analysis (II): network structure and loss calculation

Interpretation of OCP function of oceanbase Community Edition

Detailed explanation on persistence of 2022redis7.0x

Anaconda安装、Jupyter Notebook默认启动路径修改及Nbextensions插件安装

Activate function formulas, derivatives, image notes

Flutter doctor 顯示xcode沒有安裝的解决辦法

Multimodal learning toolkit paddlemm based on propeller
随机推荐
Edit the project steps to run QT and opencv in the clion
Skywalking source code analysis Part 5 - server configuration configuration module startup
Zzulioj 2903: the power of warriors
Flutter doctor 显示xcode没有安装的解决办法
Template and requirements of curriculum design of reinforced concrete structure in autumn 21 of Dagong [standard answer]
Image transformation torchvision Transforms notes
Leetcode 1992. Find all farm groups (yes, once)
Detailed tutorial on installing MySQL database in Linux environment (including uninstallation and password reset process)
JMeter installation
Hdu3527 (Hangdian) spy problem
Two minutes to show you the charging standard of the Sub Ledger System
Implementation of SQL online editor based on Vue + codemirror
Activate function formulas, derivatives, image notes
A brief talk on shutter button
激活函数公式、导数、图像笔记
Three common sense that managers must know
构建Web应用程序
Summary 111111111111111111111
Raki's notes on reading paper: learning fast, learning slow: a general continuous learning method
STC 纯硬件自动下载电路 V2