mirror of
https://github.com/Estom/notes.git
synced 2026-04-03 10:58:39 +08:00
笔试题
This commit is contained in:
16
code_segment/b.cpp
Normal file
16
code_segment/b.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user