gpt4 book ai didi

c - 在哪里写定义?

转载 作者:太空宇宙 更新时间:2023-11-03 23:47:16 25 4
gpt4 key购买 nike

<分区>

许多人告诉我,在 C 中,定义必须在 main() block 开始后立即进行,而不是在使用前进行定义。您还可以对函数进行计数,因为函数定义与同一主题相关。在 stackoverflow 和 web 上进行一些搜索后,我找不到问题的答案,或者只是找不到要搜索的关键字。

int main(){ //defining at the beginning of main
int x=0;
.
.
.
function(x);
return 0;
}

int main(){ //defining right before using
.
.
.
int x=0;
function(x);
return 0;
}

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