更新时间:2023-02-16 16:08:52
int a();
在C ++中有什么作用?
What's the effect of
int a();
in C++?
声明一个没有参数的函数,该函数返回整数。
That declares a function, with no parameters, that returns an integer.
是否等于
int a
或int a(0)
?
否。每个变量都声明一个整数类型的变量。
No. Each of these declares a variable of integer type; the second also initialises it with the value zero.
char c()$ c $又如何? c>和
double d()
?谢谢。
这些也声明具有不同返回类型的函数。
These also declare functions, with different return types.