gpt4 book ai didi

c - c中的这两个声明有什么区别?

转载 作者:太空狗 更新时间:2023-10-29 15:49:32 25 4
gpt4 key购买 nike

typedef int F1(int x);

int F1(int x);

对我来说似乎是一样的,无论是否使用 typedef..

最佳答案

typedef 没有声明变量;它声明了一个类型。

在你说之后:

typedef int F1(int x);

稍后在你的代码中你可以有这个:

F1 myfunction;

相当于:

int myfunction(int x);

关于c - c中的这两个声明有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4283148/

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