小编Zav*_*Zav的帖子

关于向量的困惑

我想知道以下代码的含义

我只是想知道它是如何工作的。

vector<int> lotteryNumVect(10); // I do not understand this part.

int lotteryNumArray[5] = {4, 13, 14, 24, 34}; // I understand this part.

lotteryNumVect.insert(lotteryNumVect.begin(), lotteryNumArray,
                      lotteryNumArray + 3); // I do not understand this part.

cout << lotteryNumVect.at(2) << endl; // I understand this part.
Run Code Online (Sandbox Code Playgroud)

c++ constructor insert vector

6
推荐指数
2
解决办法
166
查看次数

标签 统计

c++ ×1

constructor ×1

insert ×1

vector ×1