#include <iostream>
#include <vector>
using namespace std;
int main()
{
int v1 = 10;
int v2 = 20;
auto v = v1 + v2;
cout << v << endl;
vector<int> ivec { 1, 2, 3, 4 };
for (auto elem : ivec)
cout << elem << " ";
cout << endl;
for (auto it = ivec.begin(); it != ivec.end(); ++it)
cout << *it << " ";
cout << endl;
return 0;
}
auto keyword demo
最新推荐文章于 2024-04-29 14:46:15 发布