/**
* c++ primer 5.17
*
**/
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> vint1 = {0,1,2,3,4,5}, vint2 = {0,1,2,3,4,5,6,7,8,11,12,113};
decltype(vint1.size()) i = 0, sz = vint1.size();
for (; i != sz && vint1[i] == vint2[i]; ++i) {
;
}
if (i == sz) {
cout << "True" << endl;
} else {
cout << "False" << endl;
}
return 0;
}
c++ primer 练习5.17
最新推荐文章于 2021-09-28 22:37:00 发布