In my compiler's MSDN, it specifies that a std::queue has a member function called top() which is a synonym for front(). However, a call to top() simply does not compile on my system ("top is not a member of queue") while front() does. Is there a problem with my headers, or is there some compatibility reason?



LinkBack URL
About LinkBacks




Strangely however, I looked up std::queue and top() on google, and ended up on gcc's site where there was the class declaration for queue, and it also had top() declared in it. Although, thinking back, it seems that it was inside a #ifdef block of sorts.