Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with queue::pop( )

Status
Not open for further replies.

LaoMa

Programmer
Aug 24, 2002
10
US
Hi,I'm using VC++6.0
#include
#include
..
template
class QueueArray
{

public:
....
T Dequeue();
private:
vector > > vecQue;
...
};
template
T QueueArray::Dequeue()
{
...
T item;
item= vecQue.back();
vecQue.pop();

return item;
}


the line of
vecQue.pop();
doesn't compile and the error message is:
'pop_front' : is not a member of 'queueSince in the library of queue,there is
void pop()
{c.pop_front(); }
However,the push() and back() work.
I'm just confused.queue::pop() is supposed to be a ready-made member function,isn't it?
Thanks for any explanation or help.





 
Your source code is very hard to read, but this :

vector > > vecQue;

could mean that you are trying to use a vector ?? (Syntax?)


class vector has a pop_back function.

/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top