IT服务圈儿
有温度、有态度的IT自媒体平台
经 公众号: Python猫(ID: python_cat)授权转载void 是编程语言中最常见的关键字之一,从字面上理解,它是“空的、空集、空白”的意思,最常用于表示函数的一种返回值类型。
维基百科上有一个定义:
The void type, in several programming languages derived from C and Algol68, is the type for the result of a function that returns normally, but does not provide a result value to its caller.
在 C、Algol68 及它们所派生的几种编程语言中,void 类型是函数正常返回的一种类型,但是不会给调用者返回一个值。
简单来说,void 是一种类型(type),但是没有具