#include<stdio.h>
#include<iostream>
#include<list>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
list<string> test;
list<int> score;
list<string>::iterator testiterator;
list<int>::iterator testscore;
test.push_back("no");
test.push_back("march");
test.push_front("ok");
test.push_front("loleina");
test.push_front("begin");
test.push_back("end");
score.push_back(100);
score.push_back(90);
score.push_back(80);
score.push_back(70);
score.push_back(100);
score.push_back(20);
testiterator=test.begin();
testscore=score.begin();
while(testiterator!=test.end())
{
cout<<*testiterator<<'\n';
testiterator++;
}
while(testscore!=score.end())
{
cout<<*testscore<<'\n';
testscore++;
}
return 0;
}
版权归属:
王小木人个人技术文章记录
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区