qfedu-cpp-level/day9/stl_deque_demo/d5.cpp

22 lines
327 B
C++
Raw Permalink Normal View History

#include <iostream>
#include <deque>
using namespace std;
int main()
{
deque<string> d1;
// d1.resize(5);
cout << "d1.size():" << d1.size() << ", d1.empty():" << d1.empty() << endl;
try
{
cout << d1[15] << endl;
}
catch (...)
{
cout << "错误" << endl;
}
return 0;
}