c++库中 的 priority_queue 构建 小根堆 后 ,top函数 返回的是 const对象。。。怎么变成非const对象 无法从“const HuffmanNode”转换为“HuffmanNode”
收起
强制转换下就可以。不过你不要试图去修改它的成员。
报告相同问题?