gpt4 book ai didi

c - 为什么函数类型冲突会在 Clang 中给出错误?

转载 作者:行者123 更新时间:2023-11-30 15:16:30 27 4
gpt4 key购买 nike

enter image description here

我在这个网站上看到过类似的问题,每个人基本上都说更改与stdio.h冲突的函数名称。

但是,我多次更改了每个函数的名称,但它仍然给我这个错误。但为什么呢?

最佳答案

切勿在图像中发布代码

问题是您调用了 main() 以前没有见过的函数,所以这样做:

float getCelcious(void);

int main(void) {
...
}

float getCelcious(void) {
...
}

请看这里:Function Declaration and Function Prototypes .

关于c - 为什么函数类型冲突会在 Clang 中给出错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33048759/

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