std::queue<char> q;
char c = q.top();
编译的时候出现:
error C2039: 'top' : is not a member of 'queue<char,class std::deque<char,class std::allocator<char> > >'
Error executing cl.exe.
...全文
7995打赏收藏
std::queue 中top函数的用法
std::queue q; char c = q.top(); 编译的时候出现: error C2039: 'top' : is not a member of 'queue<char,class std::deque<char,class std::allocator > >' Error executing cl.exe.
Function Implemented operation
empty() Returns true if the collection is empty
size() Returns number of elements in collection
front() Returns (but does not remove) the element at the front of the queue
back() Returns the element at the end of the queue
push(newElement) Pushes a new element on to the end of the queue
pop() Removes (but does not return) the element at the front of the queue