数据类型是无效的? [英] is void a datatype ?

查看:343
本文介绍了数据类型是无效的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是无数据类型吗?

描述void是返回类型还是数据类型?

如果返回类型比它返回的类型??

is void a datatype ?
describe whether void is return type or datatype ?
if return type than what it returns ??

推荐答案

基本上它意味着没有没有类型

3 使用void的基本方法:



1)函数参数:int myFunc(void) - 函数不需要任何东西。

)函数返回值:void myFunc(int) - 函数不返回任何内容

3)通用数据指针:void * data; - ''data''是指向未知类型数据的指针,不能解除引用
Basically it means "nothing" or "no type".
There are 3 basic ways that void is used:

1) Function argument: int myFunc(void) -- the function takes nothing.
2) Function return value: void myFunc(int) -- the function returns nothing
3) Generic data pointer: void* data; -- ''data'' is a pointer to data of unknown type, and cannot be dereferenced


Void是c#中的一个关键字,表示该函数没有返回值。 br />
VB.NET中不存在Void
Void is a keyword in c# that indicates the function doesn''t return a value.
Void does not exist in VB.NET


这篇关于数据类型是无效的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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