弹出来的第一个是谁
运行下面这段程序:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> st;
for (const string& x : {"阿岚", "小满", "阿泰"}) st.push_back(x);
cout << st.back() << endl;
st.pop_back();
}
(本题用 g++ -std=c++17 -O0 编译。)
全部评论