gpt4 book ai didi

C++ 结构 : reference to overloaded function could not be resolved

转载 作者:太空宇宙 更新时间:2023-11-04 14:33:26 25 4
gpt4 key购买 nike

我正在尝试编写一个返回struct 的函数。我不断收到一条错误消息:

reference to overloaded function could not be resolved, Did you mean to call it?

请帮忙。

enter image description here

最佳答案

cin >> endl 是一个错误。 endl 仅用于输出。

要在阅读后消费到行尾,您可以使用:

cin.ignore(numeric_limits<streamsize>::max(), '\n');

但是对于您的程序来说,没有必要这样做。 (您使用的每个 >>> 阅读器都已经消耗了前导空格)。所以对于这个程序,你可以只取出 >> endl

关于C++ 结构 : reference to overloaded function could not be resolved,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35401472/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com