c++ - 从 std::priority_que 复制到 typdef 边缘
问题描述
我有typedef std::pair<int , std::pair<std::string, std::string>> edge;
我把我的边缘放入std::priority_que<edge, std::vector<edge>, Compare> que;
当我现在尝试que.pop()
回到边缘变量时,会出现错误。这是为什么?
que = priority_que with edges
edge e = que.pop() // this does not work
解决方案
推荐阅读
- php - 有没有办法从 PHP 文件中的函数中删除所有代码,以便我可以将它们用作 Content Assist 的文件而不显示实际函数?
- gcc - mq_send:glibc 强制参数 2 为非空
- javascript - 同时滚动嵌入在屏幕上的两个 PDF,但通过触摸单独滚动
- amazon-web-services - Kubernetes 集群中只有两个主节点启动,AWS 中有 kops
- javascript - 如何使用javascript在html中显示一个div并隐藏其他所有内容
- javascript - React:更新的值不会出现在 React-popup 中
- php - 如何在 PHP 中的函数之外获取函数名称?
- python - 如何在 Python 中为我的 CSV 文件将 UTC 转换为 CEST
- cmake - 什么是“NOCONFIG”值?
- java - 无法使用 java 客户端 7.0 滚动带有 appium 的 android 本机应用程序