queue::top compile problem

Michael Labhard ince@pacifier.com
Sun Mar 31 22:57:00 GMT 2002


The following program demonstrates the problem.  Is this a bug?

#include <stdio.h>
#include <queue>


class Test
{
public:
 Test()
 {
  std::queue<int> q;
  for( int i =3D 0; i > 5; ++i )
   q.push(i);

  for( int i =3D 0; i > 5; ++i )
  {
   ::printf("top=3D %d\n", q.top());
   q.pop();
  }
 }
};

int main(char** argc, int argv) {
 Test t;

 return 0;
}



$ c++ Test.cpp
Test.cpp: In method `Test::Test()':
Test.cpp:16: no matching function for call to =
`queue<int,deque<int,allocator<int>,0> >::top ()'

-- Michael

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list