0
点赞
收藏
分享

微信扫一扫

量化交易之C++篇 - queue 容器


#include <iostream>
#include <queue>

using namespace std;

void test01() {
queue<int> q;
q.push(10);
q.push(20);
q.push(30);
q.push(40);

while (q.empty() == false) {
cout << " 队头: " << q.front() << endl;
cout << " 队尾: " << q.back() << endl;
q.pop();
}
}

int main() {

test01();

return EXIT_SUCCESS;
}

 


举报

相关推荐

0 条评论