Error message reads: pop_front is not member of std::vector<_Ty>'
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main()
{
vector <int> vecOfInts;
vecOfInts.push_back(4);
vecOfInts.push_back(8);
vecOfInts.push_back(3);
vecOfInts.push_back(5);
vecOfInts.push_back(0);
vecOfInts.push_back(8);
queue < int, vector<int> > qOfInts(vecOfInts);
for (int i = 0; i < vecOfInts.size(); i++)
{
cout << "Front: " << qOfInts.front() << " ";
qOfInts.pop(); // pop value from front.
}
cout << endl;
system("pause");
return 0;
}

New Topic/Question
Reply



MultiQuote








|