笔试题

This commit is contained in:
Estom
2021-09-13 09:55:06 +08:00
parent d395cbcfad
commit 05a6a86266
8 changed files with 173 additions and 17 deletions

16
code_segment/b.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
vector<int> vec{1,2,3};
for_each(vec.begin(),vec.end(), [&](int &a){
a++;
});
for(auto a:vec){
cout<<a<<endl;
}
}