” int a();的作用是什么? "在C ++中? [英] What's the effect of "int a(); " in C++?

查看:160
本文介绍了” int a();的作用是什么? "在C ++中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

int a(); 在C ++中有什么作用?

What's the effect of int a(); in C++?

它等于 int a int a(0)

char c() double d()

推荐答案


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() double d()?谢谢。

这些也声明具有不同返回类型的函数。

These also declare functions, with different return types.

这篇关于” int a();的作用是什么? "在C ++中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆