简体   繁体   English

function 的输入和输出 void *function(){}

[英]Inputs and outputs of the function void *function(){}

A void function does not return any value as output and can take input values. void function 不返回任何值作为 output 并且可以获取输入值。 The function below seems a void function, but there is the operator *, why?下面的function好像是一个void function,但是里面有操作符*,为什么?

void *function(){
     printf("hello")
}

That is not a void function.那不是void的 function。 That is a function that returns a void* (pointer).那是一个返回void* (指针)的 function。 But it seems incomplete, because the printf() has no semicolon ;但它似乎不完整,因为printf()没有分号; and the function does not actually return a void* .并且 function 实际上并没有返回void*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM