Wednesday, May 18, 2016

Program of Queue in C++ using Built in Function

Program of Queue in C++Follow is a program which uses built in function of queue in C++. This built in function make our work sy to use queues in C++.
#include <queue>using namespace std;int main(){ queue <int> var; var.push(1); cout << var.front(); // print first value cout << var.back(); // print last value var.push(2); var.pop(); // 1st value delete int len = var.size();}
there are a lot of other functions of Built-in Queue in C++.

No comments:

Post a Comment