我是靠谱客的博主 真实酸奶,这篇文章主要介绍队列queue函数_使用queue :: size()函数检查队列是否为空,现在分享给大家,希望可以做个参考。

队列queue函数

There is a function queue::empty() that can be used to check whether queue is empty or not – it returns 1 (true) if queue is empty else returns 0 (false).

有一个函数queue :: empty()可用于检查队列是否为空–如果队列为空,则返回1(真),否则返回0(假)。

But, in this example – we are checking it by using queue::size() function.

但是,在此示例中–我们通过使用queue :: size()函数进行检查。

If we don't want to use queue::empty() function, we can check the size of the queue, if it is 0 – queue is an empty queue, if it is not 0 (gre

最后

以上就是真实酸奶最近收集整理的关于队列queue函数_使用queue :: size()函数检查队列是否为空的全部内容,更多相关队列queue函数_使用queue内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部