特牛网址导航

C++ 容器适配器——栈(stack)和队列(queue)都不支持迭代器_不支持迭代器的容器-CSDN博客

网友收藏
对于queue<int> q; 在q.push(10); 后,以下能正确返回TRUE的是:(多选题)  A. q.front() == *q.begin();  B. q.front() == q.back();  C. q.emplace(20), q.back() == 20;答案:解析:A选项,容器适配器——队列queue没有成员begin和end(因为栈和队列不支持迭代器,不..._不支持迭代器的容器